People who owe medical debts are over-penalized when it comes to their credit scores, according to a new study from the U.S. Consumer Financial Protection Bureau.

The CFPB looked at the credit and loan payment histories of 5 million anonymous consumers over a two-year period from 2011 to 2013 and assessed how well someone's credit score predicted how likely they were to pay back debt.

The agency found that people with medical debts were more likely to pay back loans than other borrowers with the same credit scores. In other words, their scores weren't truly reflective of their creditworthiness.

"This tells us that having a medical debt in collections is less relevant to a consumer’s creditworthiness than having an unpaid cellphone bill or overdue rent," CFPB Director Richard Cordray said in a phone call with reporters, according to a transcript.

Most credit bureaus don't differentiate between medical and non-medical debts. However, medical bills are different from other types of debt. "Complaints to the Bureau indicate that many consumers do not even know they have a medical debt in collections until they get a call from a debt collector or they discover the debt on their credit report," Cordray said.

The CFPB says credit reporting agencies should treat these types of unpaid bills differently, so that people with hospital bills in collections don't have their credit reports disproportionately harmed.

More than half of all debt collections that appear on Americans' credit reports are from medical bills, according to the Federal Reserve.

When collectors report unpaid debts to credit agencies, a person's credit score falls. Lenders rely on credit reports to see how likely consumers are to pay back loans, and to determine how high their interest rates should be. Even a small difference in a score can affect whether a bank will lend someone money. A poor credit score can prevent someone from getting a car loan, a mortgage, an apartment or sometimes even a job. And if the person does secure a loan, having a higher interest rate can mean paying tens of thousands of dollars more over time than a person would with a lower rate.