All consumers should be troubled by news that Equifax, one of the biggest credit reporting agencies, provided lenders with inaccurate credit scores on millions of people.

According to the Wall Street Journal, Equifax sent out erroneous credit data during a three-week period earlier this year.

The bad info could have affected interest rates charged for millions of car loans, mortgages and credit cards. It also could have resulted in loans being rejected.

Equifax called the matter a “technology coding issue” and said the glitch has been fixed.

A company exec told the Journal that “only a small number” of consumers “may have received a different credit decision” as a result of the snafu.

Be that as it may, the episode highlights the enormous influence Equifax and the other two top credit bureaus — Experian and TransUnion — have over U.S. consumers.

Each company maintains credit files on hundreds of millions of people, selling the data to lenders and others interested in knowing more about folks’ finances.

The thing is, they do this without our permission.

These companies profit handsomely from our personal information — and play a pivotal role in many financial decisions — without receiving anyone’s go-ahead to do so.

Imagine if a hospital you never visited acquired your medical data and then turned a fast buck by selling it to insurers.

That’s not so far off from what the credit agencies do.

That’s not to say they don’t perform an important fiscal function. They do.

But there’s a decided lack of accountability when a company can amass vast amounts of personal data without anyone’s approval, and then screw up your life with a clerical error.

And this isn’t the first time Equifax has dropped the ball. In 2017, the company’s servers were hacked and data on nearly 150 million Americans was exposed.

Mark Begor, Equifax’s chief executive, mentioned the latest screwup at a June investor conference.

“The impact is going to be quite small,” he said, “not something that’s meaningful to Equifax.”

That’s nice. But it’s meaningful to us.

At the very least, federal lawmakers and regulators should require more disclosure from credit agencies about what they do and how they do it.

The companies also should be required to receive an opt-in from consumers for sharing and sales of confidential info.

Yes, there needs to be a system for keeping financial wheels spinning, including lenders having real-time access to credit data.

But this industry operates too much in the shadows.

Time to let in some sunlight.