OMAHA, Neb. — Berkshire Hathaway Chairman and CEO Warren Buffett thinks CEOs of failing banks should lose literally everything they're worth.

"If a bank gets to where it needs government assistance, the responsible CEO should lose his net worth and his spouse's net worth," Buffett said at Berkshire's shareholders meeting. Whenever a situation like this arises, "it's the shareholders who pay."

Buffett's comment was followed by cheers from the crowd at the CHI Health Center in Omaha, Nebraska.

The Oracle of Omaha, as he is sometimes referred to, made his remark responding to a shareholder's question regarding the Wells Fargo scandal involving the creation of fake accounts. Berkshire is one of the largest shareholders in Wells Fargo.

The scandal, which broke in 2016, led to the departure of then CEO John Stumpf and several other executives. Wells Fargo shares have been stuck in the mud since the scandal broke, sliding more than 3% while the S&P 500 is up about 50%.

"It looks to me like Wells made some big mistakes," Buffett said. "They incentivized the wrong behavior. I've seen that in a lot of places."

"When you find a problem, you have to do something about it," Buffett said.

Subscribe to CNBC on YouTube.