The EU has something like this, the Cyber Resilience Act, and it has an exception for FOSS.
It works out okay to require compliance from paid vendors - if it costs more to comply with security regulations, that will be included in the price. But it's not reasonable to impose requirements on volunteers that way. After the modification, the EU regulation puts the burden on paid vendors who use free software (who can afford to pay for it), not on free software volunteers.
Don't be silly.
Paid software == a requirement to be of merchantable quality: to do what it claims, do it reliably, and keep doing it, so long as clearly stated requirements are met.
If this means all paid apps become tiny simplistic things in weird restrictive type-safe languages like Ada -- win!
Free software == you break it, you get to keep both halves. Our liability is what you paid, nothing more.
That's easy to stop. Disallow warranty disclaimers.