The suspected attacker, who was not identified, was in police custody, Dan Stevens, deputy emergency management co-ordinator for the Westmoreland County, told reporters.
The attacks began around 7:13a.m. EDT (1113 GMT)in several classrooms and hallways as classes were starting at Franklin Regional High School in Murrysville, 20 miles (32 km) east of Pittsburgh, officials said.
The school was evacuated quickly after a student or staff member pulled the fire alarm, said Murrysville police chief, Tom Seefeld.
"What we teach is, the first thing you want the students to do is run," Seefeld said. "The fire alarm being pulled probably assisted with evacuating the school."
Seven students between the ages of 15 and 17 and one 60-year-old adult were admitted to Forbes Regional Hospital, in Monroeville, Pennsylvania, with stab wounds.
Three were in surgery and all eight were listed in critical condition, hospital spokesman Jesse Miller said in a telephone interview.
All three undergoing surgery had been stabbed in the chest and abdomen, said Chris Kauffman, director of trauma at Forbes Regional Hospital.
"Patients who are stabbed in the abdomen and chest by definition have life-threatening injuries," Mr Kauffman said.
A ninth patient who had arrived at the hospital was air-lifted to another facility, Mr Miller said.
A 15-year-old girl who was transported to Allegheny General was discharged after being treated for "superficial" stab wounds, a spokeswoman said.