SPRINGFIELD, Mass. (AP) -- Investigators say a former chemist who tested drugs for Massachusetts police departments was high almost every day she went to work for eight years, misconduct that could potentially put thousands of criminal convictions in jeopardy.

Sonja Farak, who worked for an Amherst lab that tested drug samples for police, was high on methamphetamines, ketamine, cocaine, LSD and other drugs during most of her time there, even when she testified in court, according to a state investigative report released Tuesday. Farak worked at the lab between 2005 and 2013.

Cyndi Roy Gonzalez, a spokeswoman for Attorney General Maura Healey, said the information gathered about Farak "will no doubt have implications for many cases," but it is unclear just how many. She said it will be up to prosecutors, defense attorneys and the courts to determine the full scope of cases affected by Farak's misconduct.

"We are deeply concerned whenever the integrity of the justice system is called into question or compromised," she said.

One defense attorney told the Boston Herald that Farak handled about 30,000 cases during her career.

"This is a statewide scandal, and I think it's going to take an enormous toll on the system," attorney Luke Ryan said.

Farak's case is unrelated to the case of Annie Dookhan, who worked at a state drug lab in Boston. Dookhan was sentenced in November 2013 to at least three years in prison after pleading guilty to faking test results in criminal cases that jeopardized thousands of convictions.

The American Civil Liberties Union of Massachusetts said the number of criminal cases affected by Farak's misconduct could rival the approximately 40,000 cases thrown into question by Dookhan's actions.

"It's now beyond doubt that the drug war in Massachusetts during the Dookhan-Farak era was built on a foundation of falsified evidence," said Matthew Segal, the ACLU's legal director.

Segal said he doesn't have an estimate of how many cases could be challenged, but said prosecutors who got convictions using drug samples she tested "have an obligation to identify and notify everyone who might have been denied due process" as a result of Farak's actions.

Segal said that because Farak admitted ingesting lab "standards" - drug samples used as benchmarks to test against substances submitted by police for testing - all cases that went through the lab should be re-examined.

Last year, the Supreme Judicial Court of Massachusetts ordered an investigation into the timing and scope of Farak's misconduct. Healey's office conducted the investigation.

Many of the shocking details came from Farak's own grand jury testimony, including that she once smoked crack before a 2012 state police accreditation inspection of the now-closed lab. Farak also testified that she manufactured crack cocaine for her personal use in the lab.

Farak, 37, of Northampton, pleaded guilty to tampering with evidence, stealing cocaine from the lab and unlawful possession in January 2014 and was sentenced to 18 months behind bars and five years of probation. She served her sentence and has been released from prison.

The attorney who represented Farak during her criminal case did not immediately respond to a telephone message from The Associated Press on Wednesday.

Gov. Charlie Baker said the state will likely have to allocate more money to deal with the Farak scandal. In the Dookhan case, the state Legislature authorized up to $30 million to cover costs incurred by the court system, prosecutors, public defenders and other state agencies.

"We certainly believe we are going to have a big responsibility to work with the courts and with others to make sure that people who are affected by this have the appropriate opportunity to engage in that conversation," Baker said. "And we fully expect we will be doing that for the next several months."

Dookhan was paroled earlier this year. She worked at the lab for nine years until her suspension in 2011.

---

Associated Press Writer Bob Salsberg contributed to this report.