The train was near the village of Sulz, in Vorarlberg province. The attacker, a 60-year-old German, appeared mentally confused.
A 19-year-old man suffered stomach wounds, and a 17-year-old man had a throat injury. Both were taken to hospital.
On Saturday, a man attacked passengers on a crowded Swiss train. He used a knife and burning liquid, killing himself and a passenger.
Vorarlberg police were searching for a motive, but there appear to be no links between the two attacks.
The assailant lunged at the 19-year-old from a facing seat. He then attacked the 17-year-old as the train slowed to a halt at Sulz, 10km east of the Swiss border.
The attacker was apprehended at the stop by two police officers, who subdued him with pepper spray.
Last month, in neighbouring Germany, a 17-year-old refugee from Afghanistan, armed with an axe and a knife, wounded four tourists on a train, and stabbed a woman as he fled.
The attacker was shot and killed by police. His victims, from Hong Kong, survived.
In May, at a train station in Bavaria, a 27-year-old German man, who had been in psychiatric care, stabbed commuters, killing one and wounding three others.