The assault took place on St Nicholas Field, not far from the Co-op store on Tang Hall Lane.
It happened between 10pm and 10.45pm on Friday, March 1.
Police said the boy did not require medical treatment.
It is believed a man walked past as the incident was taking place.
-> Leeds pensioner found burglars asleep in her spare bedroomOfficers are urging the man to get in touch as soon as possible.
Anyone with information can call North Yorkshire Police on 101, select option 2, and ask for Kyle Boad.