October 22, 2026

PHP2Shell (CVE-2026-109618, CVE-2026-109619): Frequently Asked Questions

Ankit Mani
Team Manager, HiveForce Labs
PHP2Shell (CVE-2026-109618, CVE-2026-109619): Frequently Asked Questions
PHP2Shell (CVE-2026-109618, CVE-2026-109619): Frequently Asked Questions | HivePro

PHP2Shell (CVE-2026-109618, CVE-2026-109619): Frequently Asked Questions

Key takeaways
1

PHP2Shell has two critical flaws in the PHP engine itself, not in WordPress, Drupal, or any other application. Both are rated CVSS v4.0 9.2, and PHP says each can allow unauthenticated remote code execution.

2

Patched versions are PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35. Updating is the only complete fix.

3

Exploitation attempts began before disclosure. Amazon's honeypots recorded an attempt on October 17, so hunt back to at least that date.


What happened

On October 21, 2026, PHP shipped an out-of-band emergency release for two critical flaws in the engine itself, CVE-2026-109618 and CVE-2026-109619, nicknamed PHP2Shell. The fixes landed in PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35.

How the embargo broke. PHP planned a coordinated release for October 22, but the details got out first, and at least one attacker appears to have been ahead of the leak. Here is the sequence, based on the PHP Foundation's account and reporting from Tenable and Amazon:

August 19
Calif found multiple RCE paths and reported the first on August 11, and OpenAI independently reported the same root cause that day. Wiz followed on August 24. The PHP Foundation says it was aware of the out-of-memory problem as far back as 2024, though no concrete attack path was found then. Calif, OpenAI, and Wiz were later credited with the research and responsible disclosure.
October 17
Amazon's honeypots record an exploitation attempt, four days before the patches. It's unclear how that attacker got the information.
October 20
The CVE identifiers leaked, and a video demonstrating the exploit chain spread soon after. PHP responded the same day with an advance notice of an October 21 release, warning it could land sooner if details went public or attacks appeared.
October 21
PHP publishes its advisory and patches a day ahead of plan, and Calif publishes a technical write-up. Cloudflare rolls out WAF rules and reports early attacks. PHP says the public proof-of-concept code it inspected showed no functional exploits at release time.
The takeaway: the embargo held for vendors and distributions but not for the public, giving attackers head start.

How dangerous is it? Very. An unauthenticated attacker can run code as the web worker and read raw memory that may hold passwords, session tokens, API keys, and certificates from other users' requests. No bug in your application is needed, and PHP runs on roughly 70% of sites with a known server-side language, according to W3Techs. Default WordPress, Drupal, and Joomla setups were among those researchers confirmed as exploitable.

So what do you patch first, what do you do if you can't, and how do you know whether you were already hit? The questions below cover it.


FAQ

What are CVE-2026-109618 and CVE-2026-109619?

Both stem from the same behavior. When a request ends abnormally, most often from an out-of-memory condition, PHP can free the request's heap while internal bookkeeping still points at it. The worker process survives and handles the next request carrying that corrupted state.

CVE-2026-109618 is the out-of-memory corruption path. Request data is left partly initialized, and cleanup code treats it as valid.
CVE-2026-109619 is the stale global state path, a use-after-free. A later request on the same worker reaches freed memory. Confirmed routes run through session upload-progress handling and, on PHP 8.5, retained fatal-error backtraces. It has been shown to yield both memory disclosure and code execution.

Why can a fully updated site still be exposed?

The bugs sit below your application. Neither flaw needs authentication or a bug in your code, and on Apache mod_php an exploit can fire before any application code runs. PHP-FPM is also affected, but exploitation there depends more on the application. Calif reported pre-authentication code execution in its lab against specific versions of WordPress, Drupal, Joomla, and Magento, but exploitation doesn't depend on those platforms.

Which versions are affected, and which are fixed?

Every version from 5.4 through 8.5.11 is affected. Fixed releases are 8.5.12, 8.4.27, 8.3.36, and 8.2.35. PHP 7.4, 8.0, and 8.1 got minimal source backports, not releases, so prefer a build from your Linux distribution or LTS vendor. Anything older has no fix from the PHP project. PHP 8.2 reaches end of life on December 31, 2026, so plan the move to 8.3 or later now.

Which setups are most at risk?

PHP considers every web-serving installation at risk, including PHP-FPM, php-cgi, lsphp, FrankenPHP, and LiteSpeed. Apache mod_php is the highest risk, because a demonstrated exploit fires before any application code runs. Start there with anything internet-facing.

How many internet-facing PHP hosts are there?

A lot. A Shodan search for "php" on October 22, 2026 returned about 3.0 million results, led by the United States, China, Japan, Germany, and Indonesia. Treat that as a measure of how widely PHP is exposed, not of how many hosts are vulnerable. The count includes patched systems and services that only show PHP signs in their banners, and it can't tell you which build is actually serving traffic.

World map shaded in red by the number of Shodan results for the search php on October 22, 2026. Darker shading means more results; the United States, China, Japan and Germany are darkest.

Shodan search for "php", October 22, 2026. Darker shading means more results.

Is it being exploited?

Yes, and the picture has moved since the first reports. Amazon Threat Intelligence recorded an attempt on October 17, four days before disclosure, and says exploitation is now broad. Cloudflare reported early attacks as well. Details leaked on October 20. The August 19 date in some write-ups is when researchers privately found the bugs, not when attacks began. No threat actor has been publicly attributed.

Is there a public proof of concept?

Yes. Multiple exploits have been published. Treat any public exploit code as untrusted, since it is sometimes laced with malware. If you test one yourself, do it only in an isolated lab, never on production systems or from your work network.

What should I do first?

Patch first. Use mitigations only if you cannot patch today. In order:

01

Prioritize internet-facing mod_php, then every other web-serving PHP.

02

Preserve evidence. Before restarting, snapshot web, error, and WAF logs plus process and file listings. A restart destroys volatile state, and exploitation may leave little trace in application logs.

03

Inventory every copy of PHP. The php -v version can differ from the one serving traffic. Check hosting panels, appliances, and container images, and rebuild images rather than patching inside running containers. Hive Pro's scanless technology can help here by predicting impacted assets without a scan.

04

Update, then restart every worker. Restarting also clears OPcache. Distribution packages often keep the upstream version string, so verify against the vendor changelog or CVE tracker, not only php -v.

I can't patch today. What can I do?

These are stopgaps that close known paths only.

  • Set session.upload_progress.enabled=0 in php.ini, the FPM pool, or server config, not through ini_set() or .user.ini. Keep upload_max_filesize below post_max_size. PHP's guidance suggests a post_max_size of 8M, or 32M if uploads are required.

  • On PHP 8.5, also set fatal_error_backtraces=0.

  • Enforce request size, field-count, and multipart-part limits at the web server or proxy, including for requests without a usable Content-Length.

  • Remove invalid or deprecated per-request INI settings that emit early diagnostics, and fix attacker-reachable fatal errors and timeouts.

Are there mitigations I should avoid?

Yes. Don't use RLIMIT_AS or RLIMIT_DATA as a memory boundary, because they can trigger the vulnerable allocation failure. Use a container or cgroup limit that kills only the affected worker. Also be careful with memory_limit=-1. It doesn't stop an allocation failure from reaching the vulnerable path. It also removes the "Allowed memory size" log signal that several hunts rely on. That second point is an inference, so compensate with other telemetry.

Can my WAF or CDN protect me?

Partly. Cloudflare and Fastly have published managed rules, but these cover known vectors only and won't catch variants. For custom rules, match on multipart part headers so uploaded file contents never trigger them, and block three shapes no legitimate client sends: a PHPSESSID form field, a PHP open tag in a filename (full and short echo tags only), and serialized-object syntax in a filename. Log PHP_SESSION_UPLOAD_PROGRESS but don't block it, since it's the legitimate progress-bar mechanism. These rules stop the write to the session file but not a later local file inclusion read, so purge session.save_path as part of the rollout.

How do I know if I was compromised?

Start your window no later than October 17, 2026, and go further back if logs allow. Look for:

  • Unusual multipart requests followed by memory-limit errors or repeated HTTP 500s, malformed PHPSESSID response cookies, and unexplained worker churn.
  • PHP Fatal errors containing "tried to allocate" and "in Unknown on line 0". This is a high-priority lead, not proof, since other vendors note it isn't specific to PHP2Shell. Correlate it with oversized POSTs, connection resets, and worker crashes.
  • POSTs of 1,000,000 bytes or more. That's a starting heuristic that depends on the target's memory_limit. Add a burst rule of ten or more from one source in ten minutes.
  • Shells spawned by apache2, httpd, nginx, lighttpd, caddy, php-cgi, php-fpm, lsphp, or frankenphp, and on Windows by php-cgi.exe or httpd.exe. Don't limit the user list to apache, www-data, and nginx.
  • New files in /tmp, /dev/shm, /var/tmp, or web-writable directories, outbound connections on odd ports, and AH00052 child-exit entries in Apache logs.
  • Persistence: changed SSH authorized_keys, new cron entries for the web user, and unfamiliar PHP files in web roots.

Are there known indicators of compromise?

Amazon Threat Intelligence published six IP addresses seen targeting its MadPot honeypots. The list includes shared anonymization infrastructure that isn't exclusive to this activity, so investigate any hits in your logs rather than blocking the addresses outright.

IP address
103.216.220.92 31.223.184.166 37.19.200.5 134.209.159.64 103.114.163.188 95.217.98.37

Do I need to rotate credentials?

Yes, for any exposed host. Memory disclosure can leak passwords, session tokens, API keys, and certificates from other users' requests. Rotate credentials, API keys, certificates, and session secrets, and invalidate active sessions. Do it after patching so new secrets aren't exposed too, and start with internet-facing mod_php servers.

How can I find which of my assets are affected without running a scan?

Scanning has gaps for this kind of flaw. A scan only sees what it can reach, and PHP is often buried in container images, hosting panels, and appliances, where the php -v version may not match what serves traffic. Hive Pro's scanless technology predicts which of your assets are impacted by CVE-2026-109618 and CVE-2026-109619 without needing to scan them. That gives you a prioritized list quickly, so you can start with internet-facing mod_php servers while credentialed scans are still being scheduled. Treat the prediction as a starting point, and confirm the live PHP build on each flagged asset against the vendor changelog before you close it out.

Hive Pro Uni5 Xposure platform, Threat Intelligence alert details page for PHP2Shell: 5 assets impacted, 10 vulnerabilities, threat level red, with CVE-2026-109618 and CVE-2026-109619 listed with their impacted assets and patch availability.

Hive Pro Uni5 Xposure platform: PHP2Shell advisory with predicted impacted assets.

What's the last step once everything is patched?

Roll back emergency settings and restore a sensible finite memory_limit. Re-check exploitation reporting, which is still changing, and update your hunt if the picture shifts.


Get more information

See your exposure to PHP2Shell with Hive Pro
Book a Demo
Scan to book a demo

Recent Resources

Dive into our library of resources for expert insights, guides, and in-depth analysis on maximizing Uni5 Xposure’s capabilities

PHP2Shell (CVE-2026-109618, CVE-2026-109619): Frequently Asked Questions

Read More
Enterprise security team reviewing vulnerability findings and an exposure management scorecard on a large monitor

Tenable Vs Qualys A Practical Comparison for Security Leaders

Compare Tenable vs Qualys with an enterprise evaluation framework for coverage, prioritization, workflow, validation, and exposure reduction outcomes.
Read More
Enterprise security team reviewing vulnerability and exposure data on a shared screen

Rapid7 Competitors: How Security Teams Put It Into Practice

Compare Rapid7 competitors with an enterprise framework for testing coverage, prioritization, validation, and remediation across exposure management.
Read More
Enterprise security analysts reviewing vulnerability risk data on a workstation

EPSS vs CVSS: An Enterprise Framework for Safer Decisions

EPSS vs CVSS for enterprise teams: compare severity and exploit likelihood, add asset context, and build a practical exposure prioritization workflow.
Read More

Biggest Patch Tuesday ever - October. 4 Windows CVEs contributed : Part-2

Read More
Security analysts reviewing vulnerability scan findings across enterprise cloud and on-premises systems

Vulnerability Assessment Scanner: How Enterprise Teams Should Evaluate It

Learn how to evaluate a vulnerability assessment scanner for enterprise coverage, context, validation, and remediation, then turn findings into lower exposure.
Read More

What’s new on Hive Pro?

Get through updates and upcoming events, and more directly in your inbox

Reduce real exposure. Not just vulnerability volume.