The youngster was set upon by a member of a group of youths in Kilwinning in north Ayrshire on Friday.
The victim was struck on the head and had to be treated at Crosshouse Hospital before being released.
Detective Sergeant John Deans said: "I know that the area was particularly busy - there was a party at Orange Halls so there would have been a lot of people around.
"A young boy has suffered a head injury in an unprovoked attack so if you were in the area at the time or you have any knowledge of the suspect or the crime, please get in touch with us."
Police said there was nothing to suggest the attack was sectarian.