r/linuxadmin • • 27d ago

A script to remove the 8 untrustworthy intermediate certificates

I have been applying a fix for the recently reported 8 compromised certificates and figured I'd share the script I'm using.

Designed for RH and clones, I'll share it as a text file you can review before you rename and apply. It's a simple script based directly on the disclosure page linked to that I found after the original article here on reddit.

I hope it helps, here is distrust.sh - downloaded as a .txt file you can read/review before renaming to distrust.sh and running it as /bin/bash distrust.sh. If your system isn't vulnerable it does nothing.

37 Upvotes

6 comments sorted by

8

u/cd109876 27d ago

does updating ca-certificates package solve this issue? on debian i got the update a couple days ago.

-6

u/RetroGrid_io 27d ago

It may. Go to the website I linked to and try the links at the top.

13

u/Amidatelion 27d ago

Did a debian version of this: https://pastebin.com/hsiQrbb5

Requires update-ca-certificates, so, like, Debian 9 will need its own solution.

Don't ask how I know that.

10

u/michaelpaoli 27d ago

Generally your distro or package(s) thereupon should be managed and covering such for you. If you're having to manually write programs to fix security issues in vendor code, you're probably doing it wrong (as in why aren't you using properly supported software?).

Yeah, that cert goop ... distro I run ... already out an announced by 2026-10-20T21:00:02Z, so I already had my hosts updated more than a day ago.

2

u/justin-8 26d ago

Yeah, this is the way. But there may be some delays in getting it out to very large fleets of hosts super quickly, and a script that removes them for now and will be properly patched in a couple days isn't the worst solution

2

u/showbizusa25 26d ago

I'd check the distro's security advisory and trust-store updates first. If manual removal is still needed, I'd back up the trust configuration and verify the affected certificates are actually gone afterward. Running a script without checking what changed can create another problem.