PHP 8.1 is end of life: what to do about PHP2Shell
By PatchMyPHP ·
PHP 8.1 reached end of life on December 31, 2025, its last release is 8.1.34 (Dec 18, 2025), and PHP shipped no PHP2Shell fix for it on October 21, 2026. If your site runs PHP 8.1 or older, there is no patch to install: the only safe path is moving to a supported branch, and PHP 8.3 or 8.4 is the target that lasts.
This is the hardest case created by PHP2Shell (CVE-2026-109618 and CVE-2026-109619, rated 9.2 (CVSS v4.0, PHP's rating)). The flaw lets an attacker run code on the server without logging in, and for supported branches the answer is a quick update. For 8.1 and older there is no such release, so sites on those versions are both exposed and unable to patch in place.
Not sure which version you run?
Read-only: one standard page request, like a browser visit. We never send attack traffic.
Why there is no PHP2Shell fix for 8.1
PHP's project maintains only the branches still within their support window. PHP's security advisory ships the PHP2Shell fix for 8.2, 8.3, 8.4 and 8.5; 8.1 and older are out of support and receive nothing from the project. That is not an oversight. PHP 8.1's security support ended December 31, 2025, so by the time PHP2Shell was disclosed on October 20, 2026, 8.1 had already been out of maintenance for nearly a year.
There are two narrow exceptions, neither of which is a normal "update your PHP" fix:
- A distribution or LTS vendor backport. Some Linux distributions and long-term-support vendors backport critical fixes into otherwise-old packages. If you run a packaged PHP 8.1, check your distribution's tracker for the CVE rather than the version number.
- A source backport. Given the severity, PHP's security team published a minimal source backport for 8.1. It is a code branch, not a release: you would have to build PHP from source yourself, and a shared host will not install it for you.
For almost everyone, these are not practical, and the real fix is to move to a supported branch.
PHP 8.1 key dates
| Released | Nov 25, 2021 |
| Security support ended | Dec 31, 2025 |
| Last release | 8.1.34 (Dec 18, 2025) |
| PHP2Shell (CVE-2026-109618, CVE-2026-109619) | No release with the fix |
Where to move: supported versions
| Version | Latest release | Security fixes until |
|---|---|---|
| PHP 8.5 | 8.5.13 | Dec 31, 2029 |
| PHP 8.4 | 8.4.28 | Dec 31, 2028 |
| PHP 8.3 | 8.3.37 | Dec 31, 2027 |
| PHP 8.2 | 8.2.36 | Dec 31, 2026 |
Skip straight to PHP 8.3 or 8.4. PHP 8.2's security support ends Dec 31, 2026, so moving there would mean another migration within weeks. PHP 8.3 runs until December 31, 2027 and 8.4 until December 31, 2028, which buys years rather than weeks. PHP 8.5 is the newest branch (8.5.13); it is a fine target if your plugins and extensions already support it.
What breaks moving from 8.1 to 8.3
From PHP's own migration guides. "Deprecated" means the code still runs but logs a notice; the rest changes behaviour and can actually break pages.
| In | Change | What it means |
|---|---|---|
| 8.2 | Dynamic properties deprecated | Setting a property a class never declared now logs a deprecation notice unless the class opts in with #[\AllowDynamicProperties]. Older plugins and themes do this often. |
| 8.2 | "${var}" string interpolation deprecated | The ${ } form in double-quoted strings is deprecated; use "$var" or "{$var}". |
| 8.2 | utf8_encode() and utf8_decode() deprecated | Common in older import and export code. |
| 8.2 | Case-converting functions ignore the locale | strtolower(), strtoupper(), ucfirst() and similar now convert ASCII only; use the mb_ functions for other languages. |
| 8.3 | Date errors throw exceptions | The Date extension throws DateError and DateException instead of warnings, so a bad date can stop a page rather than log a warning. |
| 8.3 | Negative array index behaviour changed | After $a[-5] = x on an empty array, the next index is -4, not 0. |
In practice, the deprecations rarely stop a site; the trouble comes from abandoned plugins, themes or custom code. A safe migration looks like this:
- Update every plugin and theme to its current version first. Replace anything unmaintained.
- Turn on error logging so deprecation notices and real errors are visible.
- Run the site on a staging copy with PHP 8.3, and walk through the pages that matter.
- Switch production once staging is clean, then test again and restart PHP.
The exact panel and command-line steps are in how to update your PHP version.
What to do today if you can't move yet
Until you can migrate, php.net lists php.ini mitigations that, in its own words, "reduce exposure to specific attack paths" but "do not make an installation safe". They are a stopgap, not a fix. A WAF such as Cloudflare's can block known attacks for traffic that passes through it, but only the move to a supported, patched PHP actually closes the hole.
Want to know the day it matters? Continuous monitoring reads the real PHP version from inside your server every day and emails you the day a new fix applies to your site, plus the signs of a break-in. See pricing.
Questions
When did PHP 8.1 reach end of life?
On December 31, 2025. Its last release is 8.1.34, out Dec 18, 2025.
Is PHP 8.1 affected by PHP2Shell?
Yes. Reports say every version from PHP 5.4 on is affected, and PHP shipped no 8.1 release with the fix on October 21, 2026. PHP's security team published a minimal source backport for people who build PHP themselves, and some Linux and long-term-support vendors provide backported fixes.
Should I move from 8.1 to 8.2, 8.3 or 8.4?
Move to 8.3 or 8.4. PHP 8.2's security support ends December 31, 2026, so you would be moving again within weeks. PHP 8.3 is supported until December 31, 2027 and 8.4 until December 31, 2028.
Will my site break moving off 8.1?
Most of what changes between 8.1 and 8.3 are deprecations, which log notices but keep working. The real breaks come from code relying on the behaviour changes, or from plugins and themes nobody has updated in years. Back up and test on a copy first.
Checked December 3, 2026. Sources:
- PHP security advisory: critical remote code execution vulnerabilities, php.net (Oct 21, 2026)
- Supported versions, php.net
- Unsupported branches, php.net
- Sansec: PHP2Shell (Oct 21, 2026)
- Debian security tracker: CVE-2026-109618
- PHP 8 ChangeLog (CVE fixes per release), php.net
- Deprecated features in PHP 8.2, php.net manual
- Backward incompatible changes in PHP 8.3, php.net manual
