If you make a credit card purchase, you know how much you've spent and what the interest rate will be if you don't pay the balance in full.

Get sick and end up in the hospital, and you won't find out the cost until after the treatment is performed. The billing process is complicated, insurance may not cover everything and you might not have the money to pay all of those unexpected bills.

If this medical debt goes to collections and shows up on your credit report, it will hurt your credit score. And that makes sense, since lenders use that score to predict if a potential borrower is likely to pay back their debt.

But are the computer models being used to create these three-digit credit scores properly evaluating medical debt when predicting creditworthiness?

By looking at how people really paid their bills during this two-year period, the CFPB found that the computer models used to create credit scores may overly penalize consumers with medical collections:

Credit scores may underestimate creditworthiness for someone with unpaid medical debt that goes into collection by 10 points. In other words, someone with medical debt generally paid back their loans or bills on par with someone who had a credit score about 10 points higher.

Credit scores may underestimate the creditworthiness of someone who repays their medical debt that has gone to collections by up to 22 points.

"This tells us that having a medical debt in collections is less relevant to a consumer's creditworthiness than having an unpaid cell phone bill or overdue rent," said CFPB director Richard Cordray. "Treating medical and non-medical debt identically lowers some consumers' scores by more than is warranted given their observed likelihood of repaying loans. In short, credit scores could be more predictive if they treat medical debt and non-medical debt differently."

And while 10 to 20 points may not seem like a lot, for some people that could make it impossible to get a credit card, car loan or mortgage—or drive up the interest rate dramatically if they do qualify.

More than half of all collections on credit reports are now associated with medical debt, according to the Federal Reserve Board. The CFPB report said this debt is often caused by billing issues with medical providers or insurers.

"It's a huge problem, and I've heard from so many people who said they first found out about a medical bill when it was in collection," said Gerri Detweiler, director of consumer education at Credit.com. "For some folks, this is the only negative item on their credit report and it can hurt them for seven years."

It's important to note that the CFPB study did not call for any action—no suggestion that new rules are needed.

John Ulzheimer, consumer credit expert with CreditSesame.com thinks this new information could "stoke a fire under Congress to pass the Medical Debt Responsibility Act, which would require that paid or settled medical debt be removed from someone's credit reports within 45 days. "The problem is, the bill really hasn't gone anywhere," Ulzheimer said.

And some changes are already taking place voluntarily.

Creditors use different scoring models created by various companies. The relatively new Vantage Score 3.0, no longer counts collection accounts—including medical bills—since they are paid or settled.

FICO, which developed the first algorithms to create credit scores, will soon rollout FICO Score 9. With this new scoring model, medical collections—including unpaid medical collections—will have a smaller impact than non-medical collections.

"Medical debt is a serious issue affecting many Americans," said Anthony Sprague, a senior consumer credit specialist at FICO, in an email to CNBC. "FICO Score 9, which will launch later this year, continues to adapt to the changing credit landscape to improve the predictability and integrity of the score."