The boys are accused of assault, as well as invasion of privacy for filming the attack, reports local media NWT.
The teacher was not seriously injured but is still on sick leave two weeks after the incident, according to the report.
She remains absent from work “due to the abuse she was subjected to,” youth investigator with Karlstad Police Fredrik Persson said.
The incident is reported to be connected to a trend known in Sweden as ortens batong, which consists of filming an individual being hit on the head by a cucumber and then posting the footage on social media.
The trend dictates the impact must be hard enough for the cucumber to break.
On Friday, police in the town are reported to have received a second alert connected to the social media trend, after a young man hit another man on the head with the vegetable in a grocery store.
According to NWT's report, the incident was reported by the store due to the damage caused to the cucumber as a result of the prank.
READ ALSO: Swedes moved to tears by this adorable prank on old man