The debt load for U.S. corporations has reached a record $6.3 trillion, according to S&P Global.

The good news is U.S. companies also have a record $2.1 trillion in cash to service that debt.

The bad news is most of that cash is in the hands of a few giant companies.

And the riskiest borrowers are more leveraged than they were even during the financial crisis, according to S&P's analysis, which looked at 2017 year-end balance sheets for non-financial corporations.

On first glance, total debt has risen roughly $2.7 trillion over the past five years, with cash as a percentage of debt hovering around 33 percent for U.S. companies, flat compared to 2016. But removing the top 25 cash holders from the equation paints a grimmer picture.

Speculative-grade borrowers, for example, reached a new record-low cash-to-debt ratio of just 12 percent in 2017, below the 14 percent reported in 2008 during the crisis.