They became caught up in deep water which covered the roadway underneath a railway bridge at the village of Cummertrees.
A number of occupants were assisted from the vehicles.
Two Scottish Fire and Rescue Service crews from Annan were called out and helped at the scene.
The vehicles were later recovered but the roadway remained treacherous as continuing heavy rain made it difficult for council staff to drain the flood water.
There were a number of other incidents across Dumfries and Galloway during the adverse weather and snow further north added to the problems on higher routes.
NEWSDESK: 01461-202417