Parents of pupils at a school in Edinburgh have been sent emails with exam results for other people's children.
The city council said the mistake involved "a small number of pupils" at Portobello High School.
Families have received an apology and been asked to delete the messages.
It comes as pupils across Scotland prepare to receive their revised exam awards after the original results were downgraded.
The data breach emerged in a follow-up email to parents from the school.
It said: "You may have received an email in error from school today which contains exam result information for a young person other than your own.
"If you have received this email, do not read it and please delete it immediately.
"In line with data legislation, a full investigation is now under way regarding how this happened. We apologise for any concern this has caused you."
City of Edinburgh Council said "all the correct procedures and policies" had since been implemented.
A spokesman said: "As soon as the school realised the mistake, they alerted parents and carers to inform them, asking them to delete the email.
"It is believed to involve a small number of pupils and those affected families have been contacted directly by the school and given an apology."