Health-care stocks were poised to end the week in the red Friday after lawmakers on Capitol Hill threatened to write new laws tightening control over the nation's largest pharmacy benefit mangers to curb skyrocketing drug costs.

The Trump administration's legal challenge to former President Barack Obama's signature health insurance law, the Affordable Care Act, and Sen. Bernie Sanders' new "Medicare for All" bill also weighed on the industry's shares.

The XLV, an ETF that tracks the health-care industry's biggest companies, was down 1.48% for the week as of Friday morning. The biggest declines were from insurers Anthem, Humana and UnitedHealth Group, which were all down more than 5% for the week through Thursday's close.

Executives from CVS Health, Cigna, Prime Therapeutics, Humana and UnitedHealth's OptumRx testified about rising prescription drug costs before the Senate Finance Committee on Tuesday. The PBMs left the congressional hearing mostly unscathed but Chairman Sen. Chuck Grassley, R-Iowa, hinted that the committee is ready to write new laws to bring down drug prices.

Ana Gupte, senior health-care services analyst at SVB Leerink, said the health-care sell-off is mostly driven by the proposed legislative changes to the PBMs' business model, which are paid so-called rebates by Big Pharma for getting their drugs covered by private and public insurance plans, like Medicare. These so-called backdoor deals are suspected by lawmakers of increasing drug costs for patients.

It is "very likely" lawmakers force drug companies to give those rebates to consumers instead, starting as early as next year, Gupte said.

Separately, a federal appeals court in New Orleans said Wednesday that it will hear arguments in July on a lawsuit backed by President Donald Trump to overturn Obamacare. Dismantling the health-care law would lead to 32 million more uninsured people in the U.S. by 2026, according to an estimate from the Congressional Budget Office.

Separately, Sanders unveiled a universal health-care plan on Wednesday, which would eliminate most private health insurance by creating a government-run system to provide health insurance for all Americans.

For more on investing in health-care innovation, click here to join CNBC at our Healthy Returns Summit in New York City on May 21.

"Newsflow on the Medicare for All proposal from Senator Bernie Sanders and the scheduling of the hearing on the Texas Court decision to overthrow the ACA at the Fifth Circuit Court of Appeals in July also contributed to the sell off in health-care stocks," Gupte said.

Ross Muken, an analyst at Evercore ISI, told clients in a note that watching the industry's shares fall has "not been fun," but added he expects first-quarter earnings to be positive as "fundamentals generally remain positive and utilization still appears under control."