We need to check a fleet after a critical PHP security patch. What's a good way to find vulnerable installations and make sure the updated code is actually running?
How are you finding PHP servers that still need the patch?
Answers
Inventory every PHP build on each host, not just the one returned by php -v. Hosting panels and similar setups can have several versions installed side by side, with different sites using different builds. Each affected build needs its own fix.
After updating packages, check the PHP-FPM processes too. A package update can replace the binary on disk while an older process keeps serving requests. Restart the relevant services and verify they came back with the updated binaries.
Reply to this answer
Be careful with version-only checks. A vendor can backport a security fix without changing the upstream-looking version number, so an old-looking version isn't automatically vulnerable. Check the installed package's vendor advisory or changelog for the relevant CVEs.
For older branches without an upstream release, check whether your vendor provides a backport. If not, you'll need another supported fix or migration plan.
v.382~socketcaper:
That helps. Some of the older versions use vendor packages, so the package records matter more than just the PHP version string.
Reply to this answer
Use network discovery as a complement to host inventory. It can help find PHP servers across internal subnets that aren't on your list, but a network scan alone may not reveal every installed build or whether a vendor backport is present.
Reply to this answer
Don't stop at the servers that are running today. Check deployment inputs too, including container build files and application dependency files, so an older PHP setup doesn't get deployed again after the cleanup.
Reply to this answer
If you're tempted to test the exploit directly, treat that as a separate question from whether the package is fixed. Safeguards and the conditions needed for exploitation can affect exposure, but they don't prove the underlying code has been patched. Check the vendor's fix information as well.
Reply to this answer
Add your answer
Answers are reviewed before publication.
6r!quarryspool_492:
A reboot can cover the restart, but make sure all the expected services come back up afterward.