The French prosecutor said the attack took place in a commercial area of Romans-sur-Isère.
The city mayor said the victims were attacked while waiting in line outside a store.
The alleged assailant was arrested near the scene by the police.
No official identification of the attacker has taken place and the authorities are assessing whether the attack was motivated by terrorism.
Like the rest of France, the Lyonnais are blocked due to the coronavirus pandemic.