According to state-run news agency Xinhua, a 23-year-old suspect surnamed Kong climbed into the school in Kaiyuan city, Yunnan province, on Monday afternoon and sprayed caustic soda on a room full of students and teachers.
Two of those hit were seriously hurt, although their injuries are not life-threatening, the report said.
The suspect was detained about an hour after the attack. He allegedly sprayed the chemical as an act of revenge on society, Xinhua quoted police as saying.
Caustic soda -- also known as sodium hydroxide -- is used in the manufacturing of a number of common products, including soap, paper, and various dyes.
According to the United States' Centers for Disease Control and Prevention, exposure to caustic soda can irritate or burn the eyes and skin, provoke an allergic reaction, or even cause temporary hair loss.
History of violence
Monday's incident is not the first school attack to take place in China. In October 2018, a woman wielding a kitchen knife slashed at least 14 children at a kindergarten in the central city of Chongqing.
In 2017, 11 students were injured after a man climbed over the wall of a kindergarten with a knife and began attacking them.
CNN's Ben Westcott contributed reporting.
- Trump attacks whistleblower in now-removed tweetstorm
- President Trump: ISIS leader Abu Bakr al-Baghdadi is dead
- South African cyclist injured in scuffle with park rangers
- Elon Musk says Las Vegas tunnel hopefully will be operating by 2020
- At least 5 people died in small plane crash near Louisiana airport
- Thai Navy SEAL dies from infection he contracted during cave rescue
- Federal judge denies bid to undo Georgia voter purge
- Trans activist killed in Toronto