On October 21, 2026, the PHP developers released emergency updates for two critical vulnerabilities in the language itself. They allow a site to be hacked without a password and without any action by the owner. The attack is known as PHP2Shell. Almost any PHP site is at risk: WordPress, 1C-Bitrix, Joomla, Drupal, OpenCart, MODX, Laravel, and custom-built projects.
If your site runs on PHP, read this to the end. In 10 minutes you will know whether it affects you and will have checked your site for signs of a breach.
What happened
The bugs were found in the PHP core, not in a plugin or theme. They were assigned CVE-2026-109618 and CVE-2026-109619, and both scored 9.2 out of 10 on the CVSS v4.0 severity scale. An up-to-date CMS and up-to-date extensions do not protect you here, because the interpreter that runs them is itself vulnerable.
Both bugs involve memory handling. When PHP aborts a request, for example because it ran out of memory, some internal data is left in an invalid state. The next request to the same process may use that data. An attacker crafts requests so that the server runs their commands.
Why this is dangerous in practice:
- No password needed. One or a few requests that look like a file upload through a form are enough. PHP parses such a request before the site code starts running, so the CMS protections never get a chance to step in.
- Full access to the site. The attacker’s commands run with the web server’s permissions. The attacker places their own file (a web shell) on the server and uses it to read the database, copy customer data, redirect visitors to other sites, and send spam.
- Memory disclosure. The PHP team confirms that the vulnerabilities can expose fragments of server memory. These may contain passwords, API keys, private keys of SSL certificates, and other visitors’ session data.
Timeline
Times are Moscow time (UTC+3).
| Date | Event |
|---|---|
| October 20 | The PHP team announces a critical security release for the next day. |
| October 21, 5 p.m. | PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35 are released, and the PHP team publishes a description of the vulnerabilities and temporary mitigations. On the same day, Debian and Ubuntu release fixed packages, and the national cybersecurity agencies of the UK and Canada publish alerts. |
| October 22 | Red Hat reports that some fixes for RHEL 8, 9, and 10 are already available and the rest are in progress. The UK National Cyber Security Centre updates its alert. |
| October 23 | The PHP team reports a third vulnerability, CVE-2026-115560, and advises turning off upload progress tracking until the next scheduled release. The US CISA, the Canadian Centre for Cyber Security, and Red Hat update their guidance. |
The vulnerability descriptions are public, so unpatched sites will become targets. It makes sense to look for signs of a breach starting from October 20.
What is known as of October 24
- No successful attacks have been officially confirmed. The US Cybersecurity and Infrastructure Security Agency (CISA) and the Canadian Centre for Cyber Security report that they have not observed successful exploitation. However, a proof-of-concept exploit is already available, and the situation may change quickly. The UK agency advises not to wait: find every PHP installation, not only old ones, and update it.
- A third vulnerability, CVE-2026-115560, was found. It also involves file upload progress tracking and is not fixed by the October 21 updates. It can only be triggered by a rare combination: the site first sets the
php_binaryorphp_serializesession handler and then switches it tophpin code before starting the session. The PHP team will fix it in the next scheduled release and until then advises everyone to turn off upload progress tracking (session.upload_progress.enabled = 0). If you already did this because of CVE-2026-109619, nothing more is needed. - Servers on PHP 8.1 and older are best taken offline. CISA advises disconnecting PHP systems that cannot be updated right away, and all systems on PHP 8.1 and older, from the internet until they are updated.
- Servers with mod_php are at the highest risk. Red Hat clarifies that RHEL runs PHP-FPM by default. Its processes exit on an early error and never reach the corrupted data, so running code on such a server is harder, and a reliable attack requires precise memory manipulation. Red Hat rates the vulnerability as important rather than critical, but you still need to update: PHP-FPM is on the vulnerable list too.
- PHP can be embedded in other products. The cybersecurity agencies remind you about Docker containers, network devices, and packaged products with their own PHP inside. Their vendors update them, so watch for the vendor’s security advisories.
Does it affect your site?
Almost certainly, if the site runs on PHP and the fix is not installed yet. Every version before the fixed builds is vulnerable, including the old 7.4, 8.0, and 8.1 branches, and with default server settings.
According to the PHP team, any installation that handles requests from the internet is at risk: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. mod_php is the most dangerous: an attack has been demonstrated for it that works with a single unauthenticated request before the CMS code even runs.
| PHP version | Status | What to do |
|---|---|---|
| 8.5.12, 8.4.27, 8.3.36, 8.2.35 and newer | Fixed | Check the site against the checklist below |
| Earlier builds of 8.2–8.5 | Vulnerable | Update to the fixed build of your branch |
| 8.0 and 8.1 | Vulnerable, no updates coming | Move to 8.3 or 8.4 |
| 7.x and older | Vulnerable, no updates coming | Move to 8.3 or 8.4 urgently, testing the site on a copy first |
For the 7.4, 8.0, and 8.1 branches, the PHP team has published source code patches only. A hosting provider, server administrator, or extended-support distribution vendor can apply them, but there will be no official fixed releases. The 8.2 branch receives security fixes until December 31, 2026, so if you are changing versions, it is better to go straight to 8.3 or 8.4.
How to find your version. The hosting control panel shows it (usually under PHP settings or the site settings), and so does the admin panel of most CMSs: in WordPress, go to Tools, Site Health, Info tab. If in doubt, ask your hosting support. The version on the server command line (php -v) may differ from the one the site runs on.
In Debian, Ubuntu, and other distributions, the fix is often backported to the existing build, and the version number does not change. For example, Ubuntu 24.04 fixed its PHP 8.3.6 package, even though the fixed upstream build is 8.3.36. So compare the package version, not the PHP version number, with the table below or with your distribution’s security notice.
| System | Package | Fixed package version |
|---|---|---|
| Debian 13 | php8.4 | 8.4.27-1~deb13u1 |
| Debian 12 | php8.2 | 8.2.35-1~deb12u1 |
| Ubuntu 26.04 | php8.5 | 8.5.4-0ubuntu1.5 |
| Ubuntu 24.04 | php8.3 | 8.3.6-0ubuntu0.24.04.13 |
| Ubuntu 22.04 | php8.1 | 8.1.2-1ubuntu2.28 |
| Ubuntu 20.04 and 18.04 | php7.4, php7.2 | Ubuntu Pro subscription only |
| RHEL 8, 9, 10 and derivatives | php | Fixes are rolling out gradually; follow the Red Hat bulletin |
On Debian and Ubuntu, the installed package versions are shown by dpkg -l 'php*'. One exception among package sources is the Remi repository, popular on CentOS, AlmaLinux, and Rocky Linux: there were no updates in it on October 21, and the PHP team advises switching to distribution packages or building PHP from source. PHP builds for Windows are on the php.net downloads page.
It also matters who maintains the server. On shared hosting and managed servers, the provider updates PHP: ask about their timeline and, if needed, switch the site’s PHP version in the control panel. If you have your own unmanaged VPS or dedicated server, you or your contractor will have to update PHP. Such servers are in the greatest danger right now.
What to do right now
Only a fixed PHP version fully closes the vulnerabilities. Everything else reduces the risk until the update is installed.
- Update PHP to 8.2.35, 8.3.36, 8.4.27, or 8.5.12, depending on your branch. Start with sites and services exposed to the internet. If you are moving to a new branch, test the site on a copy first: old extensions and themes may not work on newer PHP. After the update, be sure to restart PHP-FPM or the web server, or the processes already running will keep using the old code. Then confirm that the site runs on the new version.
- If you cannot update right away, apply the temporary mitigations from the next section. They reduce the risk, but the server remains vulnerable.
- Do not forget old sites and utilities. Test copies, abandoned landing pages, and old site versions on subdomains also run on PHP and often become the entry point to the whole server. Also check Docker containers with PHP, phpMyAdmin, webmail, and control panels on the same server.
- Change passwords and keys after the update. Because memory contents can be exposed, admin passwords, payment and shipping API keys, and the SSL certificate’s private key may have reached the attacker. Change passwords and keys and reissue the certificate once PHP is already updated, or the new ones can be exposed the same way.
Some hosting providers have temporarily restricted file uploads through forms during the update. This is a protective measure, not a broken site: for example, a product photo may fail to upload in the admin panel, or an attachment in an inquiry form. Ask your hosting support when the restriction will be lifted.
Temporary mitigations until you update
This section is for those who administer the server themselves. All the measures are partial: the PHP team states plainly that only the update makes an installation safe. The settings go in php.ini, in the PHP-FPM pool (via php_admin_value and php_admin_flag), or in the web server configuration. Setting them through .user.ini, ini_set(), or the site code does not protect you, because they apply too late. After editing, restart every PHP process.
- Turn off upload progress tracking:
session.upload_progress.enabled = 0. The site keeps working; only file upload progress bars disappear, if there were any. This closes the confirmed attack path through sessions and the third vulnerability, CVE-2026-115560. Keep it on after updating PHP until the next scheduled release. In the default php.ini this line is commented out and the feature is on by default, so the value0must be set explicitly. Make sure site settings in.htaccess, the virtual host configuration, or.user.inido not turn it back on. - On PHP 8.5, also turn off fatal error backtraces:
fatal_error_backtraces = 0. - Reduce the allowed request size:
post_max_size = 8Mif the site does not need file uploads, and32Mif it does.upload_max_filesizemust be smaller thanpost_max_size. - Limit requests at the web server or proxy: body size, the number of fields and parts in
multipart/form-datarequests, and the number of headers. Where file uploads are not needed, such requests can be blocked entirely. Afterwards, test the forms and checkout: some of them are sent exactly this way. According to CISA, a web application firewall (WAF) can also give partial protection until the update. - Remove the memory limit with
memory_limit = -1, so the attacker cannot trigger an out-of-memory condition on demand. This is risky: a single heavy request can take all of the server’s memory. Watch memory usage and restore the previous value right after the update. Do not limit process memory withRLIMIT_ASorRLIMIT_DATA: that is exactly what triggers the vulnerable error. - Remove errors that can be triggered from outside. Delete outdated and invalid PHP settings that cause warnings before the site even starts. Fix fatal errors and execution timeouts in file uploads, imports, and form processing. Hiding errors with
display_errorsorerror_reportingis not enough.
; php.ini or PHP-FPM pool, until the fixed version is installed
session.upload_progress.enabled = 0
fatal_error_backtraces = 0 ; PHP 8.5 only
post_max_size = 8M ; 32M if file uploads are needed
upload_max_filesize = 2M ; smaller than post_max_size
After changing the settings, fully restart PHP-FPM or Apache: reload is not enough. Containers must be recreated. Check that the settings are in effect with a temporary phpinfo() page in a browser, not with php -i, which shows command-line settings rather than the site’s. Delete the page after checking.
If the server holds important data and PHP cannot be updated even in the next few hours, it is safer to put the site in read-only mode for a while: the web server responds with 503 to every request except GET and HEAD. A maintenance mode inside the CMS does not help, because PHP parses the request before it reaches the CMS. The UK National Cyber Security Centre goes further: if neither the update nor the mitigations can be applied quickly, it advises taking the system offline, and if that is not possible either, checking it for signs of compromise right away.
Checklist: has your site been hacked?
The update closes the vulnerability but does not remove anything an attacker may have left on the site earlier. A hacked site usually does not break and keeps working as if nothing happened, so check it even if everything looks normal.
On the site itself4 checks
- The site sometimes redirects visitors to other sites, especially when they come from search or a phone.
- A
site:example.comsearch shows unfamiliar pages: casinos, drugs, loans. - The browser, Google, or Yandex warns that the site may be dangerous.
- The site has become noticeably slower for no visible reason.
In the admin panel and on the server7 checks
- The CMS has administrators you did not create.
- Upload folders (
upload,uploads,images) contain.phpfiles. - There are PHP files with strange names or files changed after October 20, even though no one updated the site.
- The task scheduler (cron) has unfamiliar jobs.
- Logs since October 20 show the web server process starting a shell,
curl, orwget. - The server sends spam, or the hosting provider reports high load or suspicious activity.
- PHP or web server processes open outbound connections to unfamiliar addresses, or new user accounts were created under them.
If even one item applies, the site has most likely been hacked. Updating PHP will not help in that case: the backdoor the attacker left will keep working.
If your site has already been hacked
Do not delete suspicious files at random or restore the site from the first backup you find. The backup may already be infected, and deleting files destroys the traces that show what exactly the attacker did.
- Make a full copy of the site and the database in their current state; you will need it for the investigation.
- Change every password: admin panel, hosting, FTP and SSH, the database, and the API keys of payment and shipping services.
- Update PHP, the CMS, extensions, and the theme.
- Find and remove injected files, unfamiliar cron jobs, extra administrators, and changes in the database.
- Check whether customers’ personal data has been exposed. If you process personal data of people in Russia, Roskomnadzor must be notified of a breach within 24 hours, and of the investigation results within 72 hours (Federal Law No. 152-FZ on Personal Data, Article 21, Part 3.1). Under the GDPR in the EU, a personal data breach must be reported to the supervisory authority within 72 hours (Article 33).
- If Google or Yandex has flagged the site as dangerous, request a review in Google Search Console and Yandex Webmaster after the cleanup.
Site check after PHP2Shell
We check the PHP version and server settings, look for signs of a breach, and send a report with the steps to take. We move the site to a fixed PHP version: first on a copy, then on the live server without downtime. If the site has already been hacked, we remove injected files and spam and prepare it for review by Google and Yandex. The check is part of our security audit, and updates and cleanup are done as part of website support.
Sources
- PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35 security releases of October 21, 2026 and the changelog, php.net.
- Advisories for CVE-2026-109618 and CVE-2026-109619, PHP security team.
- Release announcement, mitigations for each vulnerability, and the October 23 notice on CVE-2026-115560; source patches for PHP 7.4, 8.0, and 8.1, php.net.
- Critical Vulnerabilities in PHP Require Immediate Patching, Cybersecurity and Infrastructure Security Agency (CISA).
- Critical security issue affecting PHP, UK National Cyber Security Centre (NCSC).
- AL26-026: Critical vulnerabilities impacting PHP, Canadian Centre for Cyber Security.
- Security bulletin RHSB-2026-013, Red Hat.
- Fixed packages: Debian, Ubuntu.
- Federal Law No. 152-FZ of July 27, 2006 on Personal Data, Article 21, ConsultantPlus (in Russian).
- Regulation (EU) 2016/679 (GDPR), Article 33, EUR-Lex.


