The Ministry of Justice is to be fined £140,000 by the data watchdog after the personal details of all 1,182 prisoners at a jail were mistakenly emailed to inmates' families.
A spreadsheet containing sensitive information including names, ethnicity, addresses, sentence length, release dates and details of the offences by all inmates at HMP Cardiff was sent to three families, the Information Commissioner's Office (ICO) said.
The breach was only discovered when one of the recipients contacted the prison on August 2, 2011 to report they had received an email from the prison clerk about an upcoming visit, which included the file.
The ICO found there was a clear lack of management oversight at the prison, with the clerk working unsupervised despite only having worked at the prison for two months and having limited experience and training.
ICO Deputy Commissioner and director of data protection David Smith said: "The potential damage and distress that could have been caused by this serious data breach is obvious.
Disclosing this information not only had the potential to put the prisoners at risk, but also risked the welfare of their families through the release of their home addresses.
"Fortunately it appears that the fall-out from this breach was contained, but we cannot ignore the fact that this breach was caused by a clear lack of management oversight of a relatively new member of staff.
"Furthermore the prison service failed to have procedures in place to spot the original mistakes.
"It is only due to the honesty of a member of the public that the disclosures were uncovered as early as they were and that it was still possible to contain the breach."
A lack of audit trails also meant that the disclosures would have gone unnoticed if they had not been reported by one of the recipients, the ICO added.
And the investigation also found problems with the manner in which prisoners' records were handled with unencrypted floppy disks regularly used to transfer large volumes of data between the prison's two separate networks.
An internal investigation was launched and the same error was found to have occurred on two previous occasions within the previous month, with details sent to different inmates' families.
Police and a member of the prison's staff were sent to the recipients' home addresses and checks were made to ensure the files had been deleted.
The penalty was imposed on the Ministry of Justice as the National Offender Management Service, which is responsible for commissioning and delivering prison and probation services across England and Wales, is an executive agency of the department.
A Ministry of Justice spokesman said: " We treat the security of information very seriously and took immediate steps to recover the data as soon as the loss was reported to ensure that it went no further.
"These types of incidents are extremely rare but this does not mean that we are complacent.
"A thorough investigation was held by the prison who immediately altered their procedures, and further changes were implemented across the prison estate."