Skip to content
Book a demo
All posts
News

Two critical PHP flaws, dubbed PHP2Shell, exploited in the wild

Two PHP vulnerabilities rated 9.2 out of 10 are under active exploitation, and hundreds of websites have been taken offline while teams patch.

Published
Reading
3 min
By
Kairo

Hundreds of websites have been taken offline as two PHP vulnerabilities, and , draw warnings from defenders. Both carry severity scores of 9.2 out of 10 and are rated critical by PHP. Cloudflare and watchTowr both report attacks against the flaws, which are being called PHP2Shell. Some estimates show that more than 70% of all websites on the internet use PHP, so the exposed surface is very large.

What happened

PHP rated both issues critical, each at 9.2 out of 10. Dane Knecht, the CTO of Cloudflare, said the company is already seeing attacks emerging, and Cloudflare released stopgap mitigations to help protect some customers. Jake Knott, head of threat intelligence for watchTowr, said his company is also observing in-the-wild exploitation.

Large companies and organizations like Nintendo and others took services offline as they addressed the bugs. Taking a service down is a blunt control, but it removes the exposure while patching and validation happen.

How it was done

Public reporting so far describes exploitation rather than full technical detail. watchTowr reports a variety of exploitation tools built with the help of AI, which shortens the gap between disclosure and broad opportunistic scanning. The nickname PHP2Shell points to the outcome operators are chasing on vulnerable hosts.

No attribution has been confirmed, and no single actor has been named. Treat any internet facing PHP deployment as reachable until you have confirmed its version and configuration yourself.

What to check

Work through these in order, starting with anything reachable from the internet.

  1. Inventory every PHP runtime you actually run

    Run php -v on each host and container image, and query your image registry for base images that bundle PHP. Include forgotten dependencies: marketing sites, admin panels, legacy CMS installs and vendor appliances. A bad result is any running version you cannot map to a patched release.

  2. Patch or pin to a fixed PHP release

    Check the official PHP release notes for the fixed versions covering and , then roll them through your package manager or rebuild images. Confirm the upgrade actually took effect with php -v and a request to a phpinfo style endpoint that you remove afterwards.

  3. Apply edge mitigations while you patch

    If you sit behind a web application firewall or CDN, verify the vendor rule set for these issues is enabled in blocking mode, not log only. Test with a staging request and confirm the block appears in your edge logs.

  4. Hunt for exploitation in web logs

    Grep access logs for unusual request paths, long or encoded query strings and POST bodies hitting PHP endpoints, for example grep -E 'php' on recent logs. Correlate with outbound connections from web hosts. Any new outbound traffic from a web server to an unknown host is a bad sign.

  5. Look for web shells and new files

    Run find on your document roots for files modified in the last few days, for example find /var/www -type f -mtime -7. Compare against your deployment artifact or a clean image. Files that no build produced should be treated as an incident.

  6. Reduce what a compromised PHP process can reach

    Review database credentials, cloud instance metadata access and outbound egress rules from web hosts. Restrict egress to known destinations and rotate any secret that a web process could read.

Keep reading

More from the team
that verifies every change.

All posts

See what your application allows before an attacker does.