PHP2Shell on PHP 8.1, 8.0, 7.4 and older
The PHP project publishes no release for these branches. Some distributions, control panels and hosting platforms have backported the fix. This page lists where, and what to do if you can’t move to a supported branch yet.
Updated
Short answer
PHP fixed PHP2Shell (CVE-2026-109618 and CVE-2026-109619) on 21 October 2026 in 8.2.35, 8.3.36, 8.4.27 and 8.5.12. PHP 8.1 and older are end of life, and the PHP project publishes no release for them. The flaws affect every PHP version from 5.4 onwards.
Fixes for old branches still exist. PHP’s security team published minimal source backports for PHP 7.4, 8.0 and 8.1. Ubuntu, cPanel, CloudLinux, Heroku and Ondřej Surý’s packages have backported the fix to some old branches, and some commercial support vendors say they have fixed it.
A backport fixes these two flaws only. The branch stays end of life and gets no further updates from the PHP project, so moving to a supported branch is the lasting fix.
SOCRadar, citing Shodan, counts about 884,000 internet-facing hosts running PHP 8.1 or older.
End-of-life dates and backports by branch
End-of-life dates and last releases are from php.net. Every branch below is affected and has no PHP release with the fix. The backports listed are the ones confirmed on each vendor’s own page as of 21 October 2026. Ondřej Surý’s packages and the commercial vendors are covered further down.
PHP 8.1
- End of life
- Last release
- 8.1.34
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- PHP source backport, Ubuntu 22.04, cPanel ea-php81, CloudLinux alt-php81 (Alpine only so far), Heroku-22 (PHP 8.1.34)
PHP 8.0
- End of life
- Last release
- 8.0.30
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- PHP source backport, cPanel ea-php80, CloudLinux alt-php80 (some systems), TuxCare ELS (AlmaLinux 9.2 ESU, TuxCare 9.6 ESU)
PHP 7.4
- End of life
- Last release
- 7.4.33
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- PHP source backport, Ubuntu 20.04 (Ubuntu Pro), cPanel ea-php74, CloudLinux alt-php74, TuxCare ELS (CentOS 8.4 and 8.5)
PHP 7.3
- End of life
- Last release
- 7.3.33
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- None confirmed
PHP 7.2
- End of life
- Last release
- 7.2.34
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- Ubuntu 18.04 (Ubuntu Pro), TuxCare ELS (Ubuntu 18.04)
PHP 7.1
- End of life
- Last release
- 7.1.33
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- None confirmed
PHP 7.0
- End of life
- Last release
- 7.0.33
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- Ubuntu 16.04 (Ubuntu Pro, Legacy Support), TuxCare ELS (Ubuntu 16.04)
PHP 5.6
- End of life
- Last release
- 5.6.40
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- None confirmed
PHP 5.5
- End of life
- Last release
- 5.5.38
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- Ubuntu 14.04 (Ubuntu Pro, Legacy Support)
PHP 5.4
- End of life
- Last release
- 5.4.45
- Affected
- Yes
- Fixed PHP version
- No
- Backports
- None confirmed
Where backports exist
The sources at the end of this page link to each vendor’s notice. Status changes quickly, so check the notice before relying on it.
PHP’s source backports (7.4, 8.0, 8.1)
PHP’s security team published minimal source backports “to help people building from source or without access to an LTS vendor”. They are branches in PHP’s GitHub repository, not releases. The commit calls itself a “minimal mitigation for EOL version”. In all three, the patch turns off session upload-progress handling whatever php.ini says, so features that show upload progress stop working.
Ubuntu
Ubuntu 22.04 LTS ships PHP 8.1, and its fix is a standard update. Older releases get the fix only through Ubuntu Pro, and 16.04 and 14.04 also need the Legacy Support add-on. Ubuntu says Ubuntu Pro is free for up to five machines.
- 22.04 LTS
php8.18.1.2-1ubuntu2.28Standard update (USN-8948-1) - 20.04 LTS
php7.47.4.3-4ubuntu2.29+esm5Ubuntu Pro (USN-8948-2) - 18.04 LTS
php7.27.2.24-0ubuntu0.18.04.17+esm14Ubuntu Pro (USN-8948-2) - 16.04 LTS
php7.07.0.33-0ubuntu0.16.04.16+esm22Ubuntu Pro with Legacy Support (USN-8948-2) - 14.04 LTS
php55.5.9+dfsg-1ubuntu4.29+esm18Ubuntu Pro with Legacy Support (USN-8948-2)
Debian
Debian has fixed the PHP packages in bookworm (php8.2, DLA-4848-1) and trixie (php8.4, DSA-6574-1), which ship supported branches. Debian 11 bullseye ships PHP 7.4 and left Debian LTS on 31 August 2026. Debian’s security tracker lists no bullseye or older package for CVE-2026-109618. Freexian’s Extended LTS advisory list, which covers bullseye, had no advisory for these CVEs when we checked on 21 October 2026.
cPanel (EasyApache 4)
cPanel’s EasyApache 4 change log 25.91, dated 21 October 2026, lists backports of the fix for both CVEs to ea-php74, ea-php80 and ea-php81. The newer packages, ea-php82 to ea-php85, moved to the fixed PHP versions. The backported packages list no version change.
CloudLinux alt-php
CloudLinux said on 21 October that updated alt-php and ea-php packages would follow PHP’s release, and it tracks them on its status page. As of 18:22 UTC on 21 October 2026, the status page listed fixed packages for these systems:
alt-php74- EL6 to EL10, Debian 10 and 11, Ubuntu 16.04, 18.04, 20.04, 22.04, 24.04 and 26.04
alt-php80- EL6, EL7 and EL8, Debian 10 and 11, Alpine 3.23 and 3.24
alt-php81- Alpine 3.23 and 3.24
CloudLinux gives these update commands:
yum update 'alt-php*' # EL
apt-get upgrade # Debian and UbuntuHeroku
Heroku rebuilt PHP 8.1.34 on the Heroku-22 stack with PHP’s backported fix for both CVEs. Heroku calls it “a minimal mitigation rather than a supported release” and recommends upgrading to a supported PHP version. Its changelog says to redeploy apps to pick up the fixed versions.
Ondřej Surý’s packages (deb.sury.org)
Ondřej Surý’s repository for Debian and Ubuntu includes branches back to PHP 5.6. On 21 October he wrote on the project’s issue tracker that it would carry backports for end-of-life branches as the packages were built, with ARM builds later, and that the fix “should be available for all the PHP releases in the repository”. Later that day, users in the same thread were still reporting packages for some branches and releases as missing or pending. Check that your installed package was updated.
Commercial extended-support vendors
These vendors say in their own notices that they have fixed PHP2Shell for end-of-life PHP. The list is for information only. Other vendors may have fixes we could not confirm.
- TuxCare Extended Lifecycle Support
- CloudLinux’s status page lists fixed packages php-7.4.6 (CentOS 8.4 ELS), php-7.4.19 (CentOS 8.5 ELS), php-7.0.33 (Ubuntu 16.04 ELS), php-7.2.24 (Ubuntu 18.04 ELS) and php-8.0.30 (AlmaLinux 9.2 ESU and TuxCare 9.6 ESU).
- HeroDevs Never-Ending Support for PHP
- HeroDevs writes that both CVEs “are fixed for End-of-Life PHP” and names PHP 7.4, 8.0 and 8.1. It lists no package versions.
- Ubuntu Pro
- See Ubuntu above.
What a backported fix looks like
PHP published no new 7.4, 8.0 or 8.1 release, so a backported build usually keeps the version number it had before.
- Heroku’s rebuilt runtime is still PHP 8.1.34.
- Ubuntu 22.04’s fixed package is still PHP 8.1.2. Only the package revision changed, to
8.1.2-1ubuntu2.28. - cPanel’s backports to ea-php74, ea-php80 and ea-php81 list no version change.
The PHP version number alone can’t tell you whether the fix is installed. Check the package revision or changelog, or ask your hosting company. The PHP version page explains how to check.
Unofficial patches and “fix” plugins
Patchstack advises against unofficial “fix” plugins and copy-pasted snippets: “They are not verified and can break your site.” The flaws are in PHP itself, and PHP parses each request before the application runs, so a WordPress plugin or other application code can’t fix them.
Install fixes only from PHP, your distribution, your control-panel vendor or your hosting company.
Docker images
The official php images are built only for supported branches. The tag list in Docker’s official-images repository covers PHP 8.2 to 8.5, plus an 8.6 release candidate, and has no 8.1, 8.0 or 7.4 tags. Docker Hub shows that php:8.1 was last pushed on 2 January 2026, php:8.0 on 22 November 2023 and php:7.4 on 15 November 2022, all before the fix.
Pulling these tags again gives the same vulnerable image. Move to a supported tag such as php:8.3 or later, or build PHP from a backported source. See the guide to the official PHP Docker images.
Moving to a supported branch
PHP’s manual has a migration guide for each version step, such as “Migrating from PHP 8.1.x to PHP 8.2.x”. Each one lists backward-incompatible changes, deprecated features and other changes. The 8.2 guide says the release has “a few incompatibilities that should be tested for before switching PHP versions in production environments”.
01Check what your software supports
Find out which PHP versions your application, framework or CMS supports. Do the same for its themes, plugins and PHP extensions.
02Read the migration guides
Read the guide for every step between your branch and the target. Going from 7.4 to 8.3 means reading the guides for 8.0, 8.1, 8.2 and 8.3.
03Test a copy of the site
Run a copy of the site on the new branch and test it before you switch production.
04Switch and confirm
Move the site to the new branch, restart PHP and check the version the server is running.
The update guides cover PHP packages, Docker images and application servers.
If you can’t update right away
These measures reduce exposure until a fix is in place. PHP says “only an update is a complete solution”, and that its own interim measures “do not make an installation safe”.
01Block multipart/form-data at the web server
Every known trigger is a multipart/form-data request, so blocking that content type stops those requests before they reach PHP. The rule breaks file uploads, and some shops submit cart or checkout forms as multipart, so place a test order after adding it.
# nginx if ($http_content_type ~* "multipart/form-data") { return 403; }# Apache RewriteEngine On RewriteCond %{HTTP:Content-Type} multipart/form-data [NC] RewriteRule ^ - [F]02Turn off session upload progress
Set
session.upload_progress.enabledto 0 in php.ini or the PHP-FPM pool, then restart every worker. PHP says not to rely onini_set()or.user.ini, and that the setting blocks the confirmed session paths but not other variants. PHP’s 7.4, 8.0 and 8.1 source backports already turn it off.; php.ini session.upload_progress.enabled = 0 ; PHP-FPM pool php_admin_flag[session.upload_progress.enabled] = off03Take the site offline
CERT-EU advises isolating internet-facing applications from public networks until a fix is applied. To take a PHP server offline, stop PHP-FPM and have the web server show a static maintenance page. WordPress and Magento maintenance modes don’t help, because PHP parses each request before the application runs.
PHP’s advisory lists further measures for memory and request-size limits. For signs to watch for while a server is exposed, see the detection page.
Sources
- PHP: security advisory, 21 October 2026
- PHP: unsupported branches and end-of-life dates
- PHP: supported versions
- PHP manual: migration guides
- php-src: PHP 8.1 source backport commit
- Ubuntu: CVE-2026-109618
- Ubuntu: USN-8948-1
- Ubuntu: USN-8948-2
- Debian security tracker: CVE-2026-109618
- Debian wiki: LTS
- Freexian: Extended LTS updates
- cPanel: EasyApache 4 change log 25
- CloudLinux blog: CVE-2026-109618 and CVE-2026-109619
- CloudLinux status page: PHP incident
- Heroku: PHP updates, October 2026
- Ondřej Surý: PHP packages
- deb.sury.org issue tracker: #145
- HeroDevs: php2shell blog post
- Patchstack: PHP vulnerability alert
- CERT-EU: Critical PHP vulnerabilities (advisory 2026-018)
- ENISA: Joint statement on critical PHP vulnerabilities
- SOCRadar: PHP2Shell (Shodan host count)
- Docker official images: php tag list
- Docker Hub: php