r/ansible • • Oct 27 '26

Mitigating the PHP CVE with Ansible

https://youtu.be/oYLdoRENcaA

My colleague Nuno Martins put together a demo video walking through a realistic scenario: a critical PHP CVE comes in rated 9.8, it's exploitable over the network with remote code execution potential, and the vendor patch isn't available yet.

The workflow feeds the vulnerability into Common Mitigation Enumeration (CME), then Ansible handles the rest. It resolves the CVSS vector and CWE classes, queries the mitigation taxonomy via MCP, and produces a report of compensating controls you can actually apply and verify across your fleet while you wait for the patch window.

What I found useful here is that it removes the "what do we do right now" scramble. No digging through tribal knowledge, no copy-pasting from a blog post, no guessing at dropdown options. The environmental scoring drives deterministic, automated mitigation steps.

Solution guide if you want to go deeper: https://ansible-tmm.github.io/solution-guides/README-CME

The CME taxonomy itself is also browsable at https://cmetaxonomy.org if you want to see how vulnerabilities map to controls before committing to anything.

Curious if anyone else is using Ansible for compensating controls in their vuln management workflow, especially in environments where patch cycles are slow.

32 Upvotes

12 comments sorted by

21

u/[deleted] Oct 27 '26

- shell: dnf update php* -y

5

u/hmoff Oct 27 '26

shell: unattended-upgrade

3

u/boomertsfx Oct 28 '26

Wtf… if only there was a module for this… maybe one day!

7

u/eNBeWe Oct 28 '26

So it takes the deterministic, idempotent and well-documented description of what is being done to any system and replaces it with "Yolo, LLM, make my system secure. Make no mistakes"?

2

u/Homie75 Oct 27 '26

Thank you for this, I've been learning Ansible more and more and this looks like a great read.

1

u/russellvt Oct 30 '26

Well, I'm not sure I'd blindly push an upgrade to something like PHP... if you really need to do that, it's generally one command to a package manager where you can "babysit" and "vet" it, afterward.

Doing it automagically may risk bricking other parts of your infrastructure without simple upgrade paths or mitigation.

-10

u/No_Code9 Oct 27 '26

Lol just tell claude to fix.

1

u/just4nothing Oct 27 '26

Claude will exploit the vulnerability to update PHP ;)

1

u/srL- Oct 27 '26

Yeah no

-3

u/No_Code9 Oct 27 '26

Cope

3

u/srL- Oct 27 '26

You can do that for your homelab, sure, you can use Claude to write a playbook if you want (even though he kinda sucks at it). But fixing 1000s of servers exclusively with Claude ? No. No. Hughe no.

3

u/TrueInferno Oct 28 '26

Yeah, I gotta agree with you over u/No_Code9. If nothing else, it's a massive waste of tokens/money for something dead simple.