The 15-year-old boy was walking on the road between Kingholm Quay and Dumfries, near the skate park, with a group of friends when it happened.
He was spoken to by a man and woman in a silver car and then, without warning, the male passenger allegedly leaned out the car window and punched the youngster on the face.
The boy ran off, however he was later taken to hospital for his injuries.
It happened at about 9.15 pm and police are appealing for witnesses.
Constable Nancy Dickson said: “This appears to be an unprovoked assault on a 15-year-old boy and has resulted in the victim requiring hospital treatment for his injuries.
“I would ask that anyone who witnessed the assault or knows the identity of the occupants of the vehicle to contact police on the 101 number. Incident number PDG0181880817 relates.”