Prison inmates were employed to open letters belonging to the public, including some containing bank details.
A private firm was contracted to sort letters marked "return to sender", and gave the work to Durham prison inmates.
They removed the clear plastic address windows so the paper could be recycled, and in one case account details fell into the hands of an inmate.
The Home Office said immediate action had been taken to discontinue the work because of possible security issues.
The prison originally took on work compiling a database of mail returned from households where the addressee was not known.
Inmates were asked to mark down the name of the company sending out mail, but last week it was decided to try to recycle the waste paper.
Prison officers alerted their seniors after one inmate approached them with the bank details of a member of the public.
A Home Office spokesman said: "We can confirm that HMP Durham is contracted by this private company to collate information about returned mail.
"This did not involve opening any correspondence and had been fully security checked.
"However, one item of mail was found and action has been taken to prevent this happening again."
He said the contract was only meant to include low-level information.