PHP2Shell: what the critical PHP flaw means for your website and what to do today
On 21 October 2026 the PHP project released emergency fixes for two critical flaws, nicknamed PHP2Shell (CVE-2026-109618 and CVE-2026-109619). Together they can let an attacker run their own code on a web server that runs PHP, without logging in, with a single request. PHP powers around 69% of websites whose server language is known, including most WordPress, WooCommerce, Joomla, Drupal and Magento sites, so this is not only a problem for big companies: a blog, a small shop or a booking page can be affected. Exploitation attempts were seen before the fix was public. This guide explains, in plain language, who is affected, how to check your site in five minutes, what to do if you cannot update today, and how governments reacted.
By Fırat Papatya · Published · 5 min read
This article has no affiliate links and recommends no paid product. Facts are taken from the PHP project’s fix list as reported by security vendors and news outlets on 21–22 October 2026; the situation is moving, so check the sources at the end for updates.
What happened, in short
PHP2Shell is two memory-safety bugs in PHP itself, not in a plugin or theme. CVE-2026-109618 can corrupt request data when PHP runs out of memory; CVE-2026-109619 lets state from one request survive into the next request handled by the same worker after its memory has been freed. Both are rated 9.2 on CVSS v4.0 (an earlier circulated score of 10.0 was corrected by the PHP Foundation), and both can be exploited by an unauthenticated remote attacker.
Every PHP installation that serves web requests is in scope: PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The PHP project rates mod_php as the highest risk, because a demonstrated exploit fires before any of your site’s own code runs. Researchers at Calif reported working pre-login attacks against specific versions of WordPress, Drupal, Joomla and Magento.
Timeline: Amazon’s honeypots recorded an exploitation attempt on 17 October, four days before disclosure. CVE numbers leaked on 20 October, so PHP moved its release forward and published fixes on 21 October at 14:00 UTC. Amazon now describes exploitation as broad, and recommends that investigations look back to 17 October rather than the disclosure date. Over 100 GitHub repositories claiming to be exploits appeared on disclosure day; security vendors warn that some of them are themselves malicious.
Fixed PHP versions
Updating PHP is the only complete fix. These are the first fixed releases on each branch, as listed by the PHP project on 21 October 2026:
| Your PHP branch | Fixed in | Note |
|---|---|---|
| 8.5 | 8.5.12 | Supported |
| 8.4 | 8.4.27 | Supported |
| 8.3 | 8.3.36 | Supported |
| 8.2 | 8.2.35 | Security support ends 31 Dec 2026 |
| 7.4, 8.0, 8.1 | No official release | PHP published source backports; ask your host or Linux vendor |
| 5.4 to 7.3 | No fix | End of life: move to a supported version |
Linux distributions and long-term-support vendors received the patches before release (Ubuntu published packages on 21 October), so a distribution package can be patched even if its version number looks older. Ask your host which package release is installed.
Am I affected? Find your situation
Use the row that matches how your site is built. If you are not sure, assume you run PHP: WordPress, WooCommerce, Joomla, Drupal, Magento, PrestaShop, OpenCart, phpBB, Moodle and Nextcloud all do.
| Your setup | Who has to patch | What you do today |
|---|---|---|
| WordPress or another PHP CMS on shared or managed hosting | Your host | Check your PHP version (next section), ask the host in writing to confirm the patched package is installed and PHP was restarted, and move off PHP 8.1 or older |
| Your own VPS or server (cPanel, Plesk, DirectAdmin or plain Linux) | You | Install the patched PHP packages now, restart every PHP worker, then check logs back to 17 October |
| A fully hosted site builder where you never see PHP settings | The provider | Check the provider’s status page or announcements; there is nothing to install yourself |
| A static site (no server-side code at request time) | Nobody | Nothing to patch for PHP2Shell; keep any separate PHP admin tools patched |
| Agencies and freelancers with client sites | You or each client’s host | Make a list of every client site and its PHP version today, starting with shops and sites on mod_php |
| Visitors and shoppers | Site owners | Nothing to install. As a general precaution, prefer card payments with buyer protection and watch your statements in the coming weeks |
How to check your PHP version in five minutes
WordPress: go to Tools → Site Health → Info → Server. The PHP version is listed there, and the same screen shows the PHP SAPI; "apache2handler" means mod_php, the highest-risk setup.
cPanel: open MultiPHP Manager (or "Select PHP Version" on CloudLinux hosts) and check each domain. cPanel’s EasyApache 4 release 25.91 ships ea-php82 8.2.35, ea-php83 8.3.36, ea-php84 8.4.27 and ea-php85 8.5.12; ea-php74, ea-php80 and ea-php81 received backports without a version change.
Plesk and DirectAdmin: check the PHP settings of each domain. Plesk was reported to have fixed Linux packages for 8.2.35 to 8.5.12, with older branches and Plesk for Windows still in progress on 21 October (check Plesk’s own support article); DirectAdmin’s CustomBuild has a new build, but the PHP rebuild is manual unless its cron updates are on.
Anything else: create a temporary PHP file that prints the PHP version and server API, open it once in your browser, then delete it. This shows what the web server actually runs, which can differ from the command-line version over SSH.
A version number of 8.1, 8.0 or 7.4 does not tell you whether a backport was applied. Only your host or vendor can confirm that.
If you cannot update today
These are stopgaps from the PHP advisory and national security agencies, not fixes. Use them only until the patched version is installed.
For CVE-2026-109618: set memory_limit to -1 in the main PHP configuration in a way applications cannot override. For CVE-2026-109619: set session.upload_progress.enabled to 0, and on PHP 8.5 also set fatal_error_backtraces to 0. Restart every PHP worker after any change, or it has no effect. A container or cgroup memory limit is a sensible guard against the server running out of memory, but it is not a mitigation on its own.
If your traffic goes through Cloudflare, its WAF rules for known PHP2Shell vectors are available on all plans, including free. Cloudflare itself calls them a stopgap, and they only protect traffic that actually passes through Cloudflare.
On shared hosting, settings in .htaccess or .user.ini are not a reliable mitigation; the host must patch. The UK NCSC and CERT-EU both advise taking an internet-facing system offline, or isolating it, if it cannot be patched or mitigated.
After patching: check the four things attackers change
Because attacks started on 17 October, a site that was online and unpatched may already have been touched. These are general incident checks, not specific PHP2Shell indicators:
1. New or changed administrator accounts in your CMS. 2. Recently modified or unknown PHP files, especially in upload folders, and new scheduled tasks. 3. Unexpected redirects or scripts on checkout and login pages. 4. Passwords and API keys stored on the server (database, payment, email, cloud keys): rotate them once the host confirms the patch.
If you find something, restore from a backup taken before 17 October where possible, and tell your host; if customer data may be involved, your local data-protection rules may require you to report it.
How countries reacted
Several governments and public bodies took websites offline as a precaution on 21 October rather than risk exploitation before patching. The list below is based on news reports (mainly Reuters) and agency statements collected by security researchers; it records what organisations said they did, not that they were breached.
| Country or body | Reported action |
|---|---|
| Netherlands | NCSC-NL took its own site offline; Overheid.nl, the House of Representatives and the Dutch Data Protection Authority were reported offline; NCSC-NL published an inventory of products that embed PHP |
| Finland | Valtori, the state IT provider, took public central-government services offline as a precaution |
| Denmark | Kombit took several municipal services offline, including the national school communication platform |
| France | The Interior Ministry temporarily took prefecture and local administration websites offline |
| Germany | ITZBund took several federal websites offline; the ministry said no incidents were known |
| Belgium | The foreign ministry temporarily took its websites offline |
| United Kingdom | NCSC advised patching and, where that is not possible, taking systems offline |
| European Union | CERT-EU advisory 2026-018: patch, or isolate internet-facing PHP applications until fixed |
| United States | CISA recommended patching; the NSA advised taking unpatchable systems offline (Reuters) |
| Australia, Japan | Urged organisations to update; the Australian Cyber Security Centre said it was not aware of active exploitation at the time |
We found no statement from Türkiye’s USOM about PHP2Shell as of 22 October 2026. Turkish sites on PHP hosting should follow the same steps.
What about Kuponaut?
Kuponaut is a static site: pages are built in advance and served as files, with no PHP running when you visit, and we do not run user accounts or store payment details. PHP2Shell does not affect it. We wrote this guide because many of our readers run WordPress sites and small shops, and the useful steps are the same whatever tools you use.
This is general information, not professional security advice for your specific setup. If your site handles payments or personal data and you are unsure, ask your host or a security professional today.
Links
- Help Net Security: PHP2Shell patched, update now (21 Oct 2026)
- Tenable: PHP2Shell FAQ (versions, mitigations, timeline)
- Precursor Security: PHP2Shell live blog
- Safeguard: PHP2Shell on shared hosting (cPanel, Plesk, DirectAdmin, CloudLinux)
- Safeguard: why governments took websites offline on 21 October
- Sansec research: PHP2Shell