Students at a selective high school in Sydney's west have been disciplined after hacking into a computer system, allegedly in an attempt to change their HSC assessment marks.

Up to 10 Year 12 students at Penrith High School have reportedly been questioned over the security breach, which the NSW Department of Education said occurred when students obtained a teacher's log-in details for the online database that contains student marks.

It was not known whether any HSC assessment marks were actually altered.

A spokesman for the department said the Board of Studies, Teaching and Educational Standards had received an allegation about assessment marks at Penrith High School.

"Penrith High School has taken appropriate disciplinary action against a small number of students who accessed the computer systems using a teacher's log-in," the spokesman said.