A man has been charged with attempted murder after allegedly stabbing three teenagers last night at Rosewood, west of Brisbane.

It is alleged the 42-year-old man sexually assaulted two teenage girls at a park off Bennett Street before he stabbed a 16-year-old boy and a 17-year-old man when they tried to intervene.

It is alleged he also stabbed one of the girls.

The 16-year-old boy was taken to Brisbane's Princess Alexandra Hospital with serious abdominal injuries, while the 17-year-old was taken to Ipswich General Hospital with an arm injury.

The injured girl was treated at the scene.

Police say the alleged attacker is due to face Ipswich Magistrates Court today on numerous charges, including sexual assault, indecent treatment of a child under 16 and attempted murder.