A man is in hospital under police guard after a car crash near a McDonald's south of Brisbane led to a series of stabbings and three failed carjackings, police say.

The 32-year-old was involved in a "traffic incident" shortly after noon on Wednesday, with allegations he stabbed the male driver of the other car during a fight.

Police allege he then ran to the nearby Beenleigh McDonald's where he attempted to carjack three separate vehicles, stabbing two men during his failed attempts.

Members of the public detained the man until police got to the scene.

Paramedics treated all four men for a range of injuries at the fast food outlet.

Two men sustained wounds to the abdomen, while another received cuts to the arm.

All three have been taken to hospital in a stable condition.

The alleged attacker was taken to Princess Alexandra Hospital with cuts to his hand and is also in a stable condition.