One appliance and crew from Gerrards Cross, one from Langley and one from Beaconsfield attended, along with an officer.
All the cars were in the hard shoulder of the motorway when they arrived.
The firefighters made the scene safe.
Five men were cared for by South Central Ambulance Service.
Thames Valley Police also attended.