← Blog
Article

PHP Vulnerabilities in 2026: PHP2Shell, Every CVE and the Versions to Run

PHP vulnerabilities in 2026: PHP2Shell (CVE-2026-109618, CVE-2026-109619), every php-src CVE, Composer and Laravel flaws, and which PHP versions are supported.
13 min readSecurityPHPLaravelSupply Chain

By Assim ElHammouti, Founder and Lead Engineer, NordbeamPublished Updated

Short answer

Which PHP vulnerabilities matter right now?

The PHP vulnerabilities that matter most in 2026 are PHP2Shell: CVE-2026-109618 and CVE-2026-109619, two critical remote code execution bugs in PHP itself, disclosed on 21 October 2026. Upgrade to PHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12 and restart every PHP worker. PHP 8.1 and older get no official fix. Compiled by Nordbeam, a development studio in Gothenburg and Malmö.

Patch to
8.2.35 · 8.3.36 · 8.4.27 · 8.5.12
Severity
Critical, CVSS v4.0 9.2
No official fix
PHP 8.1 and older

For most of 2026, PHP security news looked like it always does: monthly point releases fixing memory bugs in SOAP, Phar, OpenSSL and the HTTP stream wrapper, plus a steady stream of framework advisories. Then, on 21 October, the PHP project disclosed two critical bugs in the engine itself. Both let an unauthenticated request run code as the web server's PHP user.

The bugs, nicknamed PHP2Shell, sit below every PHP application. A WordPress, Drupal, Laravel or Symfony site is exposed through the PHP runtime it runs on, and no plugin or framework update can fix that.

This article covers PHP2Shell in detail, then the rest of 2026: the other php-src CVEs, Composer and Laravel, the Laravel-Lang supply-chain attack, and which PHP versions are still supported. If you also run Node.js, Bun or Ruby, we have written the same roundup for Node.js, Bun and Ruby and Rails.

What is PHP2Shell?

PHP2Shell is the name for two critical remote code execution vulnerabilities in PHP: CVE-2026-109618 and CVE-2026-109619. Both are rated CVSS v4.0 9.2 by the PHP project, both are fixed in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12, and both were published on 21 October 2026.

They are two different bugs with the same root problem: PHP handling a fatal condition in a way that leaves memory or state behind.

CVE-2026-109618, "RCE via OOM corruption". When PHP runs out of memory it exits with longjmp(). If that happens while request memory is only half initialised, request shutdown later reads and branches on invalid memory. The advisory explains that an attacker can trigger the out-of-memory condition while staying inside apparent limits, using multipart requests:

  • requests with no usable Content-Length;
  • parts with unlimited headers;
  • empty file fields with nested field names.

CVE-2026-109619, "RCE via stale global state". After a fatal error, some global state survives into the next request on the same worker and is used before it is reset. The advisory confirms three paths:

  • fatal_error_backtraces on PHP 8.5. The advisory calls this the strongest case, and it is the basis of the confirmed exploit.
  • Session upload progress. It is enabled by default and validated against mod_php and FPM.
  • INI diagnostics raised before request initialisation. The advisory notes that hiding errors with @, error_reporting or display_errors does not help.

9.2

PHP2Shell, disclosed 21 October 2026 (CVSS v4.0)

2
critical RCEs in PHP itself: CVE-2026-109618 and CVE-2026-109619
4
patched branches: 8.2.35, 8.3.36, 8.4.27 and 8.5.12
0
official releases for PHP 8.1 and older
How CVE-2026-109618 works
1 · Request

Crafted multipart upload

No usable Content-Length, many parts and headers

2 · Parse

Memory runs out mid-setup

While staying inside apparent limits

3 · Bail out

longjmp() skips initialisation

Request memory is left half-built

4 · Shutdown

Invalid memory is trusted

Code runs as the PHP worker user

The only complete fix

PHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12, then restart every worker

The exploit runs while PHP is still parsing the request, before any application code, so a framework or CMS update cannot stop it.

Who is affected by PHP2Shell?

Any PHP installation that serves web requests and runs a version before the fixed releases. That is how CISA's alert puts it, and it includes PHP-FPM, mod_php, php-cgi, FrankenPHP and LiteSpeed.

The risk is not equal across server setups. According to the PHP advisories:

SetupStatus in the advisory
Apache with mod_phpFull RCE demonstrated over HTTP with default limits and normal prefork workers
PHP-FPMSusceptible on source analysis; no complete exploit demonstrated. The session upload-progress path was validated against FPM
FrankenPHPLikely susceptible, similar to mod_php, on source analysis
LiteSpeed (LSAPI)Likely susceptible; application-specific exploits not validated

Because the bug is in the runtime, the content management system does not matter. Wiz, whose researchers are among those credited, says it demonstrated pre-authentication RCE against WordPress, Drupal and Joomla container images. The fix for all of them is the same: a patched PHP binary.

Attention

PHP 8.1, 8.0 and 7.4

The PHP project ships no releases for 8.1 and older. It has published minimal source backports as git branches for 7.4, 8.0 and 8.1. Those are for vendors and people who build PHP themselves, not a supported upgrade path. If you are on one of these versions, you need a distribution or vendor that has backported the fix, or an upgrade.

Is PHP2Shell being exploited?

Exploitation attempts are confirmed; confirmed compromises are not, as of 24 October 2026. The picture from the sources we checked:

  • Amazon says its MadPot honeypots recorded a PHP2Shell exploitation attempt on 17 October 2026, four days before public disclosure. It also says public proof-of-concept exploits appeared from about 02:00 UTC on 21 October, and that "it's unclear if any of these attempts would have succeeded in real-world systems" (AWS Security Blog).
  • CISA, on 21 October, said it had not observed successful exploitation at the time of publication.
  • Singapore's CSA, updated on 23 October, reports "widespread exploitation attempts" and multiple PoCs (CSA alert).
  • CISA's Known Exploited Vulnerabilities catalog did not list either CVE as of its 23 October update.

Treat an unpatched, internet-facing PHP server as one that is being probed now. Disclosure windows like this one are why patch speed matters more than the CVSS number.

How do you mitigate PHP2Shell if you cannot patch today?

You cannot fully mitigate it without upgrading. Both advisories say so, and CVE-2026-109619 adds that "no complete generic configuration mitigation exists". The settings below close specific paths while you schedule the upgrade. Set them in php.ini or the FPM pool (php_admin_value), never in .user.ini or with ini_set(), and restart every worker afterwards.

; Closes the session upload-progress path (worth keeping off if you don't use it)
session.upload_progress.enabled = 0

; PHP 8.5 only: closes the strongest CVE-2026-109619 path
fatal_error_backtraces = 0

; Removes PHP's own out-of-memory path (CVE-2026-109618).
; Pair it with a container or cgroup memory.max so the kernel stops a runaway worker instead.
memory_limit = -1

; Keep request sizes conservative (PHP suggests 8M, or 32M if you accept uploads)
post_max_size = 8M

At the web server or proxy, also:

  • Bound request bodies: limit decoded body size, input variables, multipart parts and headers per part, including requests with no usable Content-Length.
  • Block multipart entirely on hosts whose application does not accept uploads.
  • Recycle workers: consider pm.max_requests=1, which limits worker reuse, if your traffic allows it.
  • Avoid RLIMIT memory caps: do not use RLIMIT_AS or RLIMIT_DATA. The advisory warns that they trigger the vulnerable longjmp() path.

Then watch for PHP worker processes that start shells or download tools. CISA lists that as the indicator to hunt for.

Which PHP versions are still supported?

PHP 8.2, 8.3, 8.4 and 8.5. PHP 8.1 reached end-of-life on 31 December 2025. PHP 8.2 is in security-only support and reaches end-of-life on 31 December 2026, about two months from now.

PHP support, October 2026
  1. EOL Dec 2025

    PHP 8.1

    • Unsupported
    • No PHP2Shell release
  2. EOL Dec 2026

    PHP 8.2

    • Security fixes only
    • Patch to 8.2.35
  3. EOL Dec 2027

    PHP 8.3

    • Security fixes only
    • Patch to 8.3.36
  4. EOL Dec 2028

    PHP 8.4

    • Active support
    • Patch to 8.4.27
  5. EOL Dec 2029

    PHP 8.5

    • Active support
    • Patch to 8.5.12
Four branches get security fixes today; 8.2 drops off at the end of the year.
BranchReleasedActive support endsSecurity support endsVersion to run
PHP 8.520 Nov 202531 Dec 202731 Dec 20298.5.12 or later
PHP 8.421 Nov 202431 Dec 202631 Dec 20288.4.27 or later
PHP 8.323 Nov 202331 Dec 202531 Dec 20278.3.36 or later
PHP 8.28 Dec 202231 Dec 202431 Dec 20268.2.35 or later
PHP 8.125 Nov 202125 Nov 202331 Dec 2025 (EOL)Upgrade

Dates are from php.net/supported-versions. PHP 8.6 is at release-candidate stage and not for production. For anything you are upgrading now, we would target PHP 8.4 or 8.5, so you are not repeating the exercise in 2027.

Tip

Check the binary, not the changelog

Linux distributions often backport fixes without changing the upstream version number, so a server reporting 8.2.x may or may not be patched. Check your vendor's security tracker for CVE-2026-109618, run php -v inside the actual container or host, and remember that a running FPM or Apache process keeps the old code until it restarts.

Where do PHP vulnerabilities come from?

In 2026, from every layer of the stack, and the most dangerous ones from the engine itself. Here is where this year's advisories sit.

Where the 2026 vulnerabilities sit
Framework

Laravel, Symfony, Twig

TokenGuard auth bypass (9.2), 13 Twig advisories, Symfony parser DoS

Dependencies

Composer and Packagist

Perforce command injection (three CVEs), the Laravel-Lang tag rewrite

Extensions

SOAP, OpenSSL, pgsql, BCMath, Phar, FPM

SQL injection in pg_insert(), heap overflows, an FPM ACL bypass

Engine

Memory handling and request lifecycle

PHP2Shell: out-of-memory corruption and stale state between requests

PHP2Shell is in the bottom layer, the one every PHP application shares.

What other PHP CVEs were fixed in 2026?

Besides PHP2Shell, the regular 2026 security releases fixed dozens of CVEs in php-src. These are the ones with published advisories and confirmed branch coverage:

CVEComponentWhat it isSeverityFixed in
CVE-2026-91765SOAPUnbounded recursion; a nested XML request crashes a SoapServerHigh, 7.58.2.34, 8.3.35, 8.4.26, 8.5.11 (24 Sep)
CVE-2026-91766HTTP stream wrapperAuthorization, Cookie and Proxy-Authorization re-sent after a cross-host redirectModerate, 5.9same
CVE-2026-91767OpenSSLHeap overflow in wildcard name matching; a malicious TLS server can crash a PHP clientModerate, 6.5same
CVE-2026-91768FPMIPv6 listen.allowed_clients compares 12 of 16 bytes, so a whole /96 passesModerate, 6.5same
CVE-2026-17543pgsqlSQL injection in pg_insert(), pg_update(), pg_select(), pg_delete() via E'...' stringsHigh8.2.33, 8.3.33, 8.4.24, 8.5.9 (30 Jul)
CVE-2026-17544BCMathOut-of-bounds write in bccomp()High8.4.24, 8.5.9 (30 Jul)
CVE-2026-14355OpenSSLHeap corruption in openssl_encrypt() with AES-WRAP-PADModerate, 4.88.2.32, 8.3.32, 8.4.23, 8.5.8 (2 Jul)

The 7 May releases (8.2.31, 8.3.31, 8.4.21, 8.5.6) fixed a further batch, listed in the PHP 8 changelog:

  • an XSS in the FPM status page (CVE-2026-6735);
  • SQL injection in PDO_Firebird (CVE-2025-14179);
  • several use-after-free bugs in SOAP.

The pattern is the same as PHP2Shell: memory safety in C code, and helper functions that look safe but are not, like an escaping function in pg_insert() that can be broken out of.

Is CVE-2024-4577 still a risk?

Yes, if you run PHP in CGI mode on Windows. CVE-2024-4577 is a PHP-CGI argument injection that turns certain Windows locales' character conversion into remote code execution. It is fixed in 8.1.29, 8.2.20 and 8.3.8, and it is still in CISA's Known Exploited Vulnerabilities catalog, with known ransomware use. It is two years old and still worth checking, because the affected setups (XAMPP-style Windows servers) are often the ones nobody updates.

What Laravel, Symfony and Composer vulnerabilities were fixed in 2026?

The most serious was in Laravel's API authentication. CVE-2026-114509 (GHSA-f9x3-7vq9-cph6), published 19 October 2026, is a TokenGuard authentication bypass. On MySQL and MariaDB, a crafted non-string API credential can match a different user's record. That means an unauthenticated account takeover on token-guarded routes. It is rated Critical, CVSS v4.0 9.2, and fixed in Laravel 12.68.0 and 13.29.0.

Livewire had no new CVE this year, but an old one became urgent. CVE-2025-54068, an unauthenticated remote command execution in Livewire v3 up to 3.6.3, was added to CISA's Known Exploited Vulnerabilities catalog on 20 March 2026. It is fixed in Livewire 3.6.4. If a Laravel app still runs an older Livewire 3 release, upgrade it before anything else on this list.

Composer had three command-injection CVEs in its Perforce driver:

  • CVE-2026-40261 and CVE-2026-40176, 14 April, fixed in 2.9.6 and 2.2.27 LTS.
  • CVE-2026-84361, 27 August, fixed in 2.10.3 and 2.2.30.

All three need Perforce source metadata. Packagist.org has refused to publish Perforce source metadata since 10 April, so the risk comes from private repositories, inline package definitions and untrusted lockfiles (Packagist blog, GHSA-rvx4-ffvw-m9q3). Run Composer 2.10.3 or later, or 2.2.30 on the LTS line.

Twig 3.26.0 (20 May) fixed 13 advisories at once, including two Critical code-injection bugs, CVE-2026-46640 and CVE-2026-46633, plus several sandbox bypasses (Symfony blog). This matters most if you let users write templates and rely on the Twig sandbox.

Symfony published three denial-of-service fixes on 15 October 2026:

  • CVE-2026-108082: ReDoS in HeaderUtils::split() via Cache-Control.
  • CVE-2026-109449: unbounded nesting in the expression parser.
  • CVE-2026-109413: unbounded recursion in the YAML inline lexer.

Take the latest patch release of your branch; the Symfony advisories note that the first HeaderUtils fix had to be corrected.

What was the Laravel-Lang supply-chain attack?

On 22 and 23 May 2026, an attacker used a leaked GitHub token to rewrite about 700 historical release tags across the laravel-lang packages. The affected repositories were lang, attributes, http-statuses and actions. The malicious code sat in a src/helpers.php file registered under autoload.files, so it ran on every PHP request, not only at install time. It downloaded a credential stealer. Packagist removed the malicious releases on 23 May (Snyk's analysis).

Two lessons carry over to every PHP project:

  • A version number is not proof. Because existing tags were rewritten, a version that looked old and trusted could resolve to new code. A committed composer.lock records the exact commit each package was installed from, which is what protects you from a rewritten tag. A composer update run in that window is what pulled the new code.
  • Autoloaded files run on every request. A malicious dependency in PHP does not need an install hook. Treat a new autoload.files entry in a dependency diff as something to read.

If you installed any laravel-lang/* package on 22 or 23 May, rebuild from a clean image and rotate every secret the PHP process could read.

What should you patch first?

  1. Upgrade PHP to 8.2.35, 8.3.36, 8.4.27 or 8.5.12 on every server and image, and restart FPM, Apache, FrankenPHP or LiteSpeed. Verify with php -v where the code actually runs.
  2. Apply the interim settings above anywhere you cannot upgrade today, and keep session.upload_progress.enabled=0 afterwards if you do not use it.
  3. Get off PHP 8.1 and older, and put PHP 8.2's end-of-life on 31 December 2026 in the plan.
  4. Upgrade Laravel to 12.68.0 or 13.29.0 if you use token authentication on MySQL or MariaDB, and Livewire to 3.6.4 or later.
  5. Upgrade Composer to 2.10.3, Twig to 3.26.0, and Symfony to the latest patch of your branch.
  6. Run composer audit in CI, commit composer.lock, and read dependency diffs that add autoloaded files.

Nordbeam builds and maintains web applications. If you are on an end-of-life PHP version and the upgrade keeps slipping, our web development team can help you plan it.

What is PHP2Shell?
PHP2Shell is the nickname for CVE-2026-109618 and CVE-2026-109619, two critical remote code execution vulnerabilities in the PHP engine disclosed on 21 October 2026. One comes from how PHP handles running out of memory, the other from state that survives between requests. Both are rated CVSS v4.0 9.2 and fixed in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12.
Is the PHP vulnerability fixed?
Yes, in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12, released on 21 October 2026. You must also restart every PHP worker (PHP-FPM, Apache, FrankenPHP or LiteSpeed) after upgrading. PHP 8.1 and older have no official release, only source backport branches.
Does PHP2Shell affect WordPress?
Yes, through PHP rather than through WordPress code. The vulnerable code is in the PHP runtime, so WordPress, Drupal, Joomla, Laravel and Symfony sites are all exposed if their PHP version is unpatched. Updating WordPress does not fix it; upgrading PHP does.
Is PHP 8.1 end of life?
Yes. PHP 8.1 reached end-of-life on 31 December 2025, and its last release was 8.1.34. It did not receive an official release for the PHP2Shell vulnerabilities in October 2026.
When does PHP 8.2 reach end of life?
PHP 8.2 security support ends on 31 December 2026. It currently receives security fixes only, and the latest release is 8.2.35. Plan an upgrade to PHP 8.4 (supported until 31 December 2028) or PHP 8.5 (supported until 31 December 2029).
Is CVE-2024-4577 still exploited?
CVE-2024-4577, the PHP-CGI argument injection on Windows, is still listed in CISA's Known Exploited Vulnerabilities catalog with known ransomware use. It affects PHP running in CGI mode on Windows with certain locales and is fixed in 8.1.29, 8.2.20 and 8.3.8 and later.
Which Laravel vulnerabilities should I patch in 2026?
Two stand out. CVE-2026-114509, a critical TokenGuard authentication bypass on MySQL and MariaDB, is fixed in Laravel 12.68.0 and 13.29.0. CVE-2025-54068, an unauthenticated remote command execution in Livewire v3, has been in CISA's Known Exploited Vulnerabilities catalog since 20 March 2026 and is fixed in Livewire 3.6.4.
How do I check my PHP project for vulnerable dependencies?
Run composer audit, which checks composer.lock against known security advisories, and run it in CI. It does not check the PHP runtime itself, so also check php -v on each server and your distribution's security tracker.

Running an old PHP version?

Tell us which PHP version you are on, what runs on it and where it is hosted. We will tell you what the upgrade involves and how to stop falling behind again.

Start the Conversation →

Get in Touch

Which workflow should AI improve first?

Book a practical review of one high-value workflow. You'll speak directly with Assim, Nordbeam's founder and lead engineer.
Email directly
Email
hello@nordbeam.io
Locations
Gothenburg & Malmö, Sweden
Response time
Within 24 hours