Two youths pushed and punched the child as she walked in Glencairn Road, Dumfries, at around 5.50pm yesterday.
The pair made off towards Terregles Road after the attack.
The girl was not seriously injured.
Police Scotland appealed for information about the incident.
The two boys were in their teens. One had blond spiky hair and was wearing a white T-shirt with a skull design on it, while the other had darker hair and was wearing a blue hooded top.