The spray is sometimes used by officers as a restraint option when faced by someone who is violent or threatening violence.
It can temporarily incapacitate someone without wounding or killing them.
Two boys, aged 13 and 14, have been arrested in connection with the incident and were later bailed, with conditions to return to the police station later this month.
The incident happened on Bedford Avenue in Cheltenham on Monday, April 17 between 5pm and 5.20pm.
One of the offenders also allegedly threatened to throw a brick at the girls and made abusive comments.
Police were called to the scene by the ambulance service and paramedics provided medical attention as the substance caused an irritation.
Enquiries are ongoing and investigating officers are keen to hear from anyone who witnessed what took place and has not yet spoken to police.
Information can be provided by completing an online crime information form on the Gloucestershire police website by quoting incident 362 of April 17.