A newly disclosed hidden key that allowed free access to the Framingham Police Department’s evidence room has forced Middlesex prosecutors to alert attorneys with pending criminal cases in the town.

Framingham Police on Oct. 25 notified Middlesex District Attorney Marian Ryan’s office of the existence of a “ ‘hide-a-key’ that permitted unrecorded access to the evidence area,” according to the warning letter the DA sent.

Once inside the evidence room, cops could have gotten into the cage where drugs, money, weapons and more are kept because the cage or a box with a key to the cage was “sometimes unlocked,” the letter said.

The lock to the evidence room was changed on Sept. 21, 2015, prosecutors said.

Middlesex prosecutors also confirmed an ongoing investigation by Attorney General Maura Healey’s office into money taken from the evidence room. Former Framingham police evidence officer Alan Dubesther, who resigned in April 2016 and declined to comment yesterday about the allegations, is being investigated in the case, according to the DA.

“Our office has sent notices of discovery to all attorneys who represent defendants in cases in which Officer Alan Dubesther was a witness. We have thus proactively notified all defendants who may potentially be impacted to ensure their right to a fair trial,” said Meghan Kelly, a spokeswoman for the Middlesex DA. “Going forward this notice will be provided in all pending Framingham cases.”

Kelly was unable to immediately say how many letters were sent. Framingham Police Chief Kenneth Ferguson did not return calls or emails for comment.

The secret access key to the Framingham police evidence room is the latest problem for the scandal-plagued criminal justice system in Massachusetts, including evidence missing from a Braintree evidence hold and the potential tainting of tens of thousands of cases by state drug lab chemists Annie Dookhan and Sonja Farak.

“Massachusetts is now almost certainly the evidence scandal capital of the United States,” said Matthew Segal, legal director of the Massachusetts ACLU, which is arguing on Nov. 16 before the Supreme Judicial Court for the estimated 24,000 Dookhan cases to be thrown out.

“These scandals keep happening here partly because, unlike other states, we have inadequate systems to prevent them, no clear protocols for disclosing them, and no accountability measures that are capable of deterring future scandals,” Segal told the Herald.

Defense attorneys said the filings raise “significant” and “troubling” questions about the integrity of the evidence held by Framingham Police.