The injuries occurred as students and teachers tried to subdue the perpetrators, it said, adding that both had been detained.
One of the suspects was a former student while another attended the school, local news site 59.ru reported, citing local police sources. One of them was undergoing psychiatric treatment and was known to authorities, it added.
Police and ambulances were called at 10:20 am local time Monday (00:20 a.m. ET) to School No. 127 in the Motovilikhinsky area of the city, which lies near the Ural Mountains about 850 miles to the east of Moscow.
Alastair Jamieson is a London-based reporter, editor and homepage producer for NBC News.