Crew members tend to a Delta Air Lines Inc. aircraft parked at a field in Victorville, California, U.S., on Monday, March 23, 2020.

The $2 trillion coronavirus rescue package passed late Wednesday by the Senate would cut the compensation for the highest-paid American executives if their companies accept financial assistance from the federal government.

The legislation would prevent company officials who made more than $425,000 last year from getting a raise until at least a year after the loan is repaid. Those who were paid more than $3 million will see their total pay reduced, though they will still be able to pocket millions.

The average compensation for an S&P 500 company CEO in 2018 was $14.5 million, according to the AFL-CIO's Executive Paywatch project.

"This will require reductions in compensation for c-level executives who take loans," Greg Grogan, a partner at Simpson Thacher & Bartlett who specializes in executive compensation, said in an email.

The bill, the largest stimulus passed by Congress in modern times, provides hundreds of billions of dollars in loans and grants to industries hit hard by the COVID-19 financial panic. It also calls for direct cash payments of up to $1,200 for individuals and $2,400 for couples, with payments set to arrive in about three weeks.

The relief measures come as efforts to contain the unfolding public health crisis via social distancing have tanked markets and brought the American economy to a near standstill. States around the country have ordered tens of millions of people to stay indoors, while shutting down restaurants and bars and other spaces where people gather in order to slow the spread of the flu-like contagion.

Jobless claims reported on Thursday, at 3.28 million, were nearly 5 times the record set in the 2008 recession, the worst financial calamity many Americans can remember.

The executive compensation provisions of the bill came after criticism that the stimulus measure would repeat mistakes made in the heat of the 2008 crisis. The rescue package enacted at the time for financial institutions was criticized for bailing out the largest U.S. banks — which reported losses so grave they threatened the health of the U.S. economy — without conditions attached.

A scathing report produced in 2009 by New York Gov. Andrew Cuomo, who was at the time the state's attorney general and is now at the center of the current crisis, found that nine bailed-out banks paid out bonuses totaling $33 billion in 2008, even as Americans around the country were losing their jobs and getting thrown out of their homes.

The Senate coronavirus package attaches some conditions to executive compensation even if it falls short of what progressives were hoping for. While related legislation passed by the Democratic-controlled House of Representatives would have limited executive pay to 50 times median worker pay, the Senate bill applies a somewhat more convoluted formula.

If an employee was paid more than $3 million last year, the Senate bill limits their future pay to $3 million plus half the difference between their previous pay and $3 million.

Delta CEO Edward Bastian, whose total compensation last year was about $15 million, would be limited to about $9 million, for instance. Bastian has already said he is forgoing his salary. A CEO earning the average S&P 500 salary of $14.5 million could only make $8.75 million. An executive making $5 million would be limited to $4 million.

While the limit on raises for those earning more than $425,000 was included in early drafts of the legislation, the pay cuts for America's highest earners only showed up in drafts circulated when the text was nearly final.

Some on the left criticized the bill for not going far enough.

"I can't think of a worse way to use precious taxpayer dollars right now than to pad the pockets of CEOs at bailed-out corporations," Sarah Anderson, the executive compensation analyst at the progressive think tank Institute for Policy Studies, said in a statement. "The failure of senate leaders to secure meaningful CEO pay limits helps nobody except top executives."

Notably, the limit applies to bonuses, stock awards and other benefits, rather than just salaries, which often make up only a small portion of executive compensation. It applies for two years to airline executives — the travel industry receives special assistance in the bill — and for a year until after the loan is paid back to executives in other industries.

According to the AFL-CIO, the average CEO-to-worker pay ratio in the S&P 500 was 287-to-1 in 2018.

The Senate bill must still be approved by the House of Representatives and signed by the president to become law. A House vote is expected on Friday.

— CNBC's Lauren Hirsch and Kayla Tausche contributed to this report.