Out of whack weather, gluttonous inventories and changing consumer spending patterns have shouldered much of the blame for sluggish retail sales. But often lost in the shuffle is the role of ballooning student loan debt, which exceeds $1.3 trillion and counting.

Student debt obligations are growing faster than the average salaries for recent graduates, and require an estimated $160 billion in annual payments, according to new analysis from Moody's. That's $40 billion greater than Amazon's annual revenue, and is larger than the combined yearly sales of Home Depot and Lowe's.

Aside from potential government intervention, the problem is only getting worse for retailers. The velocity of growth tied to student loan debt is "staggering," having more than doubled from $580 million in 2008, Moody's said. That comes as the average salary for recent graduates has edged only slightly higher.

Meanwhile, the largest holders of student loan debt are now Americans between ages 30 and 39, who have historically been the biggest spenders.

"Total retail sales including vehicles roughly exceeds $4 trillion in 2016," Moody's analyst Charlie O'Shea said. "The very high level of debt repayment is money that could be spent elsewhere in the economy."

While these debt payments will keep a lid on retail sales growth for the foreseeable future, there are a few companies that may benefit, Moody's said. Those include discounters such as Wal-Mart and Target, off-price players including TJX and Ross, and dollar stores.

"The only potential 'non-losers' may be the retailers that typically benefit from the 'trade-down' effect," O'Shea said.

Retail sales were up 2.8 percent through July, according to the Commerce Department.