Police said the driver deliberately drove his Peugeot into the soldier in the southeastern city of Valence.
The soldier is among thousands protecting sensitive sites around the nation after the deadly jihadist assaults in Paris in 2015.
The impact of the car left the soldier with injuries to his knee and shin.
Local authorities said the driver was shot in the arm and the leg and was seriously wounded. A stray bullet hit a passerby in the calf.
Attacks in Paris on satirical newspaper Charlie Hebdo and a Jewish supermarket killed 17 people in January 2015, with a series of coordinated shootings and bombings in the city in November leaving 130 people dead.