Riding a bicycle can result in getting arrested

Hello.

Riding a bicycle without a protective helmet can result in getting arrested and imprisoned.

Is the sentence correct? I mean the its subject is “Riding a bicycle”, while “getting arrested” reffers to someone who rides a bicylce without a helmet and this person is not explicitly mentioned in the sentence.

It’s fine. It could be argued that it appears as if the bicycle is not wearing a protective helmet, but sometimes you just need to apply common sense.
This type of example is quite common.

Thank you, Bee!

Obviously opinions differ on this one, but I don’t think the sentence is right. I would prefer:

“Riding a bicycle without a protective helmet can result in arrest and imprisonment.”