Scottish Qualifications Authority (SQA) results are not due until August 7 but students logging into the St Andrews University website on Wednesday were able to see how they had performed.
Schools, universities and colleges receive results of Highers and Advanced Highers a week before pupils. The error occurred when the university was uploading the results on to its website.
It is the second time the university has done this, and exam bosses at the SQA said they were seeking “urgent assurances that such an error can’t happen again”.
The mistake was brought to the attention of the university by a parent. The university closed its portal, iSaint, where the results were accessed, on Thursday morning.
During the 12 hours the portal was open, 65 pupils saw their results.
A spokeswoman for St Andrews University said: “The university regrets this breach of embargo, which was caused by a combination of a system error and the efficiency of staff who processed data early. The university has notified the SQA of the mistake.
“As a result of the temporary glitch in our computer systems, it became possible for 65 students already admitted to the university to access the results of their SQA national qualifications on the university website for a 12-hour period between Wednesday evening and Thursday morning. The matter was brought to our attention by a parent and action was quickly taken to close the loophole.
“It is very important to stress that this error did not affect people seeking admission to St Andrews or awaiting a decision upon a conditional offer.”
St Andrews and Aberdeen universities made the same error in 2010 when 38 students from St Andrews saw their results. The SQA said there was no indication of other universities being involved this time.
An SQA spokesman said: “We are disappointed that an error at St Andrews University has resulted in some of their applicants being able to view confidential information.
“We are especially disappointed in view of the fact that the university has admitted that a similar error was made by them two years ago.
“The error occurred whilst St Andrews University staff were uploading exam results which they had received from UCAS. We are expressing our disappointment to the university in the strongest terms and seeking urgent assurances that such an error can’t happen again.”