PHP powers more than two thirds of websites whose server-side language is known.[4] On 21 October 2026 the PHP team fixed two vulnerabilities that affect almost all of those installations: CVE-2026-109618 and CVE-2026-109619. Both are rated critical, and neither requires the attacker to have an account or a password.[1]
The pair was quickly nicknamed “PHP2Shell”. Some headlines compare it to Log4Shell; others call it overblown. In this article we separate what is firmly known today from what is still unclear, and set out what you need to do as a site owner.
In short
What we know
- The flaw is in the PHP engine itself, so the server is exposed even if your WordPress or Laravel code is clean.[1]
- The attacker needs no user account or password.[1]
- The four supported branches have fixes; 7.4–8.1 only get source-code patches.[1]
- The first exploitation attempt was seen on 17 October, four days before disclosure.[4]
The practical takeaway: if your site isn't running PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35 — or a newer release on the same branch — it needs updating today. On shared hosting this is usually in your provider's hands, so ask them for written confirmation.
What happened?
Security firms Calif and Wiz Research found the flaws in August and reported them to the PHP team through coordinated disclosure. The patches were scheduled for 22 October. When the CVE IDs leaked on social media a day earlier, PHP brought the release forward — but exploitation attempts had already started before the patches were out.[4][5]
Calif finds the flaws
Several unauthenticated code-execution paths are identified in the PHP engine.[5]
Reported to PHP
Coordinated disclosure begins. On 24 August, Wiz Research independently reports the same issues.[5]
First exploitation attempt
Amazon records a php2shell attempt on its MadPot honeypot network. How the attacker got the details is unknown.[4]
CVE IDs leak
The identifiers surface on Hacker News and social media. CERT-EU publishes advisory 2026-018.[4]
Attacks before the patch
Cloudflare sees attack traffic and rolls out WAF rules to every customer, free plan included.[5]
Patches released
The release planned for 22 October is brought forward a day because of the leak.[4]
First assessments
Sansec reports that mass exploitation is harder than first feared and that most PoCs fail on a default install.[5]
How does the flaw work?
PHP handles each request in a worker process. When a request finishes, the worker cleans up its memory and moves on to the next one. Both flaws exploit the moment that cleanup is skipped: when a request hits a fatal error (most typically exceeding memory_limit), PHP bails out using the C function longjmp().[6] What's left behind — half-built data and state pointing to freed memory — becomes something an attacker can shape.
- 1The request is crafted to exceed the memory limit or hit a fatal error. PHP aborts it with
longjmp(). - 2Normal cleanup never runs. Half-built data and state pointing to freed memory are left behind.
- 3The next request on the same worker treats that state as valid. The result can be code execution or a memory leak.
Here is how the PHP security team officially describes the two flaws:
“Out-of-memory handling can interrupt PHP while internal request data is only partially initialized. Request cleanup may then treat the invalid data as valid.”[2]
“Request-owned internal state can survive after its backing memory has been freed. A later request handled by the same worker may use that stale state before normal initialization resets it.”[3]
The records that circulated during the leak showed a score of 10.0; the PHP Foundation said this was incorrect.[4] The official score for both is 9.2 on CVSS v4.0.
Who is affected?
According to the PHP advisory, every PHP installation that serves web requests is at risk.[1] The vulnerable code path has existed since PHP 5.4.0 — that is, since 2012 — and is present in the default configuration.[4] The level of risk depends on how PHP is connected to the web server:
| Server setup | Risk | Notes |
|---|---|---|
| Apache mod_php | Highest | The demonstrated exploit triggers before any application code runs. |
| PHP-FPM | High | Behind Nginx or Apache; most shared and VPS hosting. |
| LiteSpeed (LSAPI) | High | Common on cPanel/CloudLinux shared hosting. |
| php-cgi | High | Targeted by ransomware campaigns via CVE-2024-4577 in 2024. |
| FrankenPHP | High | Listed as affected in the official advisory. |
Because the flaw sits in PHP rather than in any application, every PHP application on the same server is exposed. Calif reported confirmed unauthenticated code execution against specific versions of WordPress, Drupal, Joomla and Magento; the same list includes Laravel, Symfony, phpMyAdmin, Nextcloud, Roundcube, MediaWiki and WHMCS.[5] Applications that aren't on the list, such as WooCommerce, OpenCart or PrestaShop, carry the same risk as long as they run on the same PHP version.
Find your PHP version
Everything depends on the PHP version you're running. There are three ways to find out, depending on your access:
php -v
php-fpm -v # the version serving the web may differ from the CLIcurl -sI https://yoursite.com | grep -i x-powered-by
# X-Powered-By: PHP/7.4.33Dashboard → Tools → Site Health → Info → Server
# the "PHP version" rowNo command line? Use our free HTTP header inspector to look at the X-Powered-By header. If the header is hidden you won't see a version — that's good practice, but it means you'll need to check your hosting panel instead. Enter the version you find below:
Safety depends on the patch number, not the branch (8.3, 8.4): each branch has its own fixed release. For example, 8.3.36 is patched while 8.4.20 is not.
| PHP branch | First fixed release | Status |
|---|---|---|
| 8.5 | 8.5.12 | Fixed release available |
| 8.4 | 8.4.27 | Fixed release available |
| 8.3 | 8.3.36 | Fixed release available |
| 8.2 | 8.2.35 | Fixed, support ending |
| 7.4 – 8.1 | — | No official release |
| 5.4 – 7.3 | — | No fix |
What should you do?
Today
Upgrade PHP to a fixed release and restart every PHP worker. An update has no effect until running workers are restarted. On shared hosting you can usually pick a version in cPanel's “MultiPHP Manager” or Plesk's “PHP Settings”, but only your provider can confirm the patch is actually installed on the server.
If you can't update right away
PHP has published settings that narrow specific attack paths. They don't make an installation safe; in PHP's own words, updating is the only complete fix.[1]
; php.ini or FPM pool (php_admin_value). ini_set() and .user.ini are not enough.
memory_limit = -1 ; CVE-2026-109618 — monitor memory usage
post_max_size = 8M ; 32M if you need file uploads
upload_max_filesize = 2M ; keep below post_max_size
session.upload_progress.enabled = 0 ; CVE-2026-109619
fatal_error_backtraces = 0 ; PHP 8.5 only
; Then restart every worker, for example:
; sudo systemctl restart php8.3-fpmTwo caveats: memory_limit = -1 lets a single request consume all of the server's memory, so you'll need to monitor usage. And the multipart/form-data block suggested by Sansec can break file uploads and some checkout forms.[5] If you use Cloudflare, the WAF rules released for known attack patterns are enabled on the free plan too — again, only a stopgap.[4]
This week
Since the first exploitation attempt was seen on 17 October, check access logs from that date onward for unusual multipart/form-data requests, look for new or modified PHP files in the web root, and watch for admin accounts you don't recognise.[4] Because the flaw also allows memory disclosure, it's prudent to rotate your database password, API keys, payment integration keys and session secrets.[5]
How worried should you be?
The Log4Shell comparison doesn't hold — for now. In its 22 October update, Sansec writes that no universal request that works against every server has been shown, and that an attack needs specific knowledge of, and conditions on, the target. In one researcher's tests, most of the circulating PoCs failed against a default PHP install.[5] The PHP security team also says it found no working exploit among the code that appeared after the leak at the time of disclosure.[4]
Calling it “just noise” would be wrong, though. Amazon and Cloudflare saw exploitation attempts before the patches shipped, and Amazon now reports broad exploitation. In the Netherlands, several sites — including the House of Representatives and the NCSC — were taken offline as a precaution.[4][5] History also argues for caution: CVE-2024-4577 in PHP-CGI and CVE-2019-11043 in PHP-FPM both ended up on the known-exploited list and were used in ransomware campaigns.[4]
A fair summary for today: not every site can be taken over with one click, but an unpatched PHP server is now a known target — and exploits mature over time.
When a patch isn't enough
If you're on a supported PHP branch, this story ends with an update and a restart. The real problem is sites built years ago, whose themes and plugins are tied to old PHP versions. On those sites, updating PHP can break the site — and not updating leaves the hole open.
The orange bar matters most. PHP 8.2 received the fix today, but its security support ends completely on 31 December 2026.[1] If a similar flaw appears in 2027, there will be no official fix for 8.2 — exactly the situation 7.4 and 8.1 users are in today.
Keep patching, or rebuild?
| Patch only | Website rebuild | |
|---|---|---|
| Today's flaw | Closed — if you're on a supported branch | Closed |
| PHP 8.1 and older | No official fix; you build from source | Moved to a supported stack |
| Old themes and plugins | Often break on newer PHP | Clean, maintained codebase |
| The next vulnerability | Another emergency fix | A defined update process |
| Speed and SEO | Unchanged | Core Web Vitals and technical SEO built in |
If any of the following applies to you, a patch only buys you time until the next vulnerability:
- 1.Your site runs PHP 8.2 or older.
- 2.At least one theme or plugin hasn't been updated in a year.
- 3.You can no longer reach the agency or developer who built the site.
- 4.You're afraid the site will break if you press “update”.
- 5.You're not sure who has access to the admin panel.
Risk check
Six questions to see how ready your site is — not just for this flaw, but for the next one.
How exposed is your website?
Does your site run on a PHP-based system such as WordPress, Joomla, Magento or OpenCart?
Is your PHP version 8.2 or older?
Have theme, plugin and core updates been applied regularly over the last 6 months?
Does the agency or developer who built the site still support you?
Is the site more than 4 years old?
Does the site have forms, user accounts, payments or file uploads?
Answer 6 more questions to see your result.
Frequently Asked Questions
Sources
Every technical claim in this article is based on the primary sources below. We update the article as the story develops.
- PHP Group — 21 October 2026 security advisory
- GHSA-w8hw-w9fx-j79w (CVE-2026-109618)
- GHSA-6wmf-4rv5-p3rp (CVE-2026-109619)
- Tenable — php2shell frequently asked questions
- Sansec — PHP2Shell research
- Palo Alto Unit 42 — Threat Brief
- Rapid7 — Critical unauthenticated RCE analysis
- Huntress — Rapid Response: php2shell
- Google Cloud — Responding to core PHP vulnerabilities
- PHP — Supported versions