The embattled distributor of the Epipen learned Wednesday the federal government now believes it overcharged Medicaid and Medicare for the product for years.

The news now potentially allows states like Colorado to try to recoup millions from Mylan.

RELATED: Millions spent marketing EpiPen amid price increases

In a letter from the administrator of the Centers for Medicare and Medicaid Services (CMS), CMS said Mylan improperly classified the Epipen as a generic drug and thus was responsible for paying less money back to Medicaid and Medicare than it should have.

In 2015, Medicaid and Medicare spent nearly a half billion dollars on Epipens before rebates kicked in.

Generally speaking, drug manufacturers must pay a rebate of 23 percent for brand name drugs and 13 percent for generics in order to be included in the government health insurance programs.

RELATED: EpiPen maker to offer discounts after price hike firestorm

CMS said it has repeatedly told Mylan its drug was improperly classified. It’s not clear why CMS was unable to simply reclassify itself.

Colorado’s Department of Health Care Policy and Financing told 9NEWS it is awaiting further guidance from CMS as to how to potentially recoup money from Mylan.

Minnesota recently figured out it was owed more than $4 million because of the misclassification for 2015 alone.