The 36-year-old man was attacked in an alleyway, between Cranley Road and Bayswater Road, in Barton, Oxford at about 20:45 GMT on Saturday.
His injuries are not thought to be life-threatening. Police said it was a "highly unusual and isolated" attack.
No details have been released about the offender but officers have appealed for information.
A man has suffered serious burns after an unknown substance was thrown at his neck and torso, police have said.