Meet Easycomm at GITEX GLOBAL 2026Dubai, 7–11 December Book a meeting
Site Logo
PHP Vulnerability 2026: What PHP2Shell Is and How  to Update Your PHP Version 
October 27, 2026

PHP Vulnerability 2026: What PHP2Shell Is and How  to Update Your PHP Version 

In the third week of October 2026, a PHP security problem forced website owners, hosting  companies and IT teams to stop what they were doing and update. It has a nickname, PHP2Shell,  and it is made up of two critical flaws in the PHP engine itself: CVE-2026-109618 and CVE-2026- 109619. Both can let an attacker run code on a server without logging in. Several large sites,  including Wikipedia, were reported to have gone offline as a precaution while they patched. 

This guide explains in plain language what PHP2Shell is, which PHP versions are affected, how to  check your PHP version, and exactly how to update PHP on shared hosting, a VPS, Docker and  WordPress. It also covers a follow-up flaw, CVE-2026-115560, disclosed on 23 October, so that one  update is not where you stop. 

Quick answer 
To fix PHP2Shell, update PHP to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or any newer release on your  branch), then restart PHP-FPM or Apache so the new code is actually running. Updating  WordPress, Laravel or any other CMS does not update PHP itself.
Key takeaways 
• PHP2Shell is two flaws, CVE-2026-109618 and CVE-2026-109619. Both are rated CVSS  v4.0 9.2 (Critical) and allow unauthenticated remote code execution.

• PHP released the fixes on 21 October 2026. Anything older than the fixed version on its  branch is affected, and the underlying flaws go back to PHP 5.4. 

• The bug is in PHP, not in your CMS. Your PHP version decides your exposure. 

• A public proof-of-concept exploit exists and attack attempts were reported on the day of  disclosure, so treat this as urgent. 

• A related flaw, CVE-2026-115560 (disclosed 23 October), affects even patched releases.  PHP plans a fix in its next regular release. Disable session.upload_progress if  you do not use it. 

• AI models helped researchers find the flaws. They did not fix them. The PHP team did.

What Is PHP2Shell? 

“PHP2Shell” is the nickname the security community gave to two vulnerabilities in PHP core. The  name points to the outcome: an attacker exploits PHP to get a remote shell, meaning command-line  control, on the server. PHP’s own advisories refer to the flaws only by their CVE numbers.

Think of PHP as the engine that runs every PHP website. WordPress, WooCommerce, Drupal,  Joomla, Laravel and Magento all sit on top of it. PHP2Shell is a defect in the engine, so a perfectly  maintained website can still be exposed if the engine underneath is out of date. 

CVE Name in PHP’s  advisoryWhat goes wrong CVSS  v4.0
CVE-2026-109618 RCE via OOM  corruptionWhen PHP runs out of memory while  starting a request, it can abandon the  request with its memory only partly set up.  Request shutdown then treats that broken  state as valid.9.2
CVE-2026-109619 RCE via stale global  statePHP can keep request-owned data after  the memory behind it has been freed, and  a later request on the same worker uses it.  This can lead to memory disclosure and  code execution.9.2


Both flaws are rated High attack complexity but need no login and no user interaction. Exploitation  happens below the application layer, so your website’s own logs may show almost nothing. Apache  with mod_php is the highest-risk setup, and PHP says a full attack there completes before any  application code runs. PHP-FPM, php-cgi, FrankenPHP and LiteSpeed are also affected. For PHP-FPM,  PHP says it is susceptible but a complete exploit for CVE-2026-109618 had not been demonstrated at  the time of the advisory. 

PHP2Shell Timeline: What Happened and When

Date Event
2024 PHP’s first external security audit (by Quarkslab, funded by Germany’s  Sovereign Tech Agency) leads a PHP core developer to notice early signs of the  underlying memory-corruption bug. No exploit path is found, and the issue sits  unresolved for about two years.
August 2026 Researchers at Wiz and Calif find and report the flaws using AI-assisted  methods. Calif used OpenAI’s GPT-5.6 Sol. Wiz used its own tooling with  Gemini 4 Argon and GPT-5.6 Sol, as reported.
20 Oct 2026 Details and screenshots of an exploit tool named PHP2Shell leak ahead of the  planned disclosure. PHP pulls its emergency release forward by a day.
21 Oct 2026 PHP releases 8.5.12, 8.4.27, 8.3.36 and 8.2.35 at about 14:00 UTC. CISA urges  organizations to update immediately, and security teams report exploitation  attempts the same day.
22 Oct 2026 Researchers publish a demonstration of a configuration-dependent code execution chain on PHP 8.5.12.
23 Oct 2026 PHP discloses CVE-2026-115560 in the session upload-progress feature. It  affects patched releases and will be fixed in the next regular release.


You will see “14-year-old bug” in headlines. That figure comes from OpenAI president Greg  Brockman, and it fits the facts: affected releases go back to PHP 5.4, which came out in 2012. 

Did AI Really Find and Fix This PHP Bug? 

A viral claim says an AI model “solved a 20-year-old PHP bug.” That is not what happened, and it  matters if you want to repeat it accurately. 

• Age: the bug is reported as about 14 years old, not 20. 

• Found, not fixed: OpenAI says security firm Calif identified a critical flaw using GPT-5.6 Sol  under its Patch the Planet program. Wiz separately and independently reported both flaws,  using its own tooling with Gemini 4 Argon and GPT-5.6 Sol. 

• Who fixed it: the PHP project shipped the patches. The fix commit is titled “Avoid state  corruption via bailout” and covers both CVEs. 

• What AI actually did: the researchers say the models mostly sped up the hardest step,  turning old weaknesses into working exploits. A human still pointed the work at the right  place. 

This is part of a bigger shift in how software gets built and attacked. If you want the wider picture,  read how AI is changing software development and how AI is transforming web development. Our  explainer on Gemini 4 Argon covers one of the models named in this story. Teams that use AI coding  tools such as Claude Code can also point similar tools at their own code, with human review of the  results, before someone else does. 

Which PHP Versions Are Affected by PHP2Shell?

PHP branch Support status Affected versions Fixed version
PHP 8.5 Active Below 8.5.12 8.5.12
PHP 8.4 Active Below 8.4.27 8.4.27
PHP 8.3 Active Below 8.3.36 8.3.36
PHP 8.2 Security fixes only  (ends 31 Dec 2026)Below 8.2.35 8.2.35
PHP 8.1 and older End of life All versions No standard release  from PHP


If you run an end-of-life version, upgrade to a supported branch first. If you truly cannot, you still  have options: the PHP security team published minimal source backports for PHP 7.4, 8.0 and 8.1,  and Linux distributions and long-term-support vendors received the patches ahead of release. Ask  

your vendor for updated packages, and put the server behind a WAF or off the public internet until  you can move. 

Is Your Website Affected? 

If your site runs on PHP and your hosting has not yet applied the fixed version, yes. That includes  WordPress, WooCommerce, Drupal, Joomla, Laravel, Magento and any custom PHP application.  Security researchers demonstrated attacks against WordPress and Drupal sites as part of the  disclosure. 

Two points trip people up: 

• Updating your CMS does not update PHP. WordPress, Laravel and Drupal updates change  application code. PHP comes from your operating system packages, your container image or  your hosting provider. 

• PHP hides in unexpected places: control panels such as cPanel and Plesk, vendor appliances,  Windows software that bundles php.exe or php-cgi.exe, CI runners, old container images,  marketing sites and vendor-hosted tools. 

Sites that do not use PHP, for example those built purely on Node.js or Python, are not affected by  these two CVEs. Hosted platforms such as Shopify manage their own infrastructure, so you do not  patch PHP on a standard Shopify storefront yourself. Any separate PHP system connected to your  

store is still your responsibility, such as a WordPress blog, a custom backend or a legacy admin  panel. 

How to Check Your PHP Version 

Use whichever method matches your setup: 

1. Command line: run php -v. This shows the command-line version, which can differ from  the version your website uses. For PHP-FPM, check the FPM binary too, for example php fpm8.4 -v on Debian or Ubuntu. 

2. phpinfo(): create a temporary file containing <?php phpinfo();, open it in your  browser, read the “PHP Version” line, then delete the file straight away. 

3. WordPress dashboard: go to Tools, then Site Health, then the Info tab, and open the Server  section. 

4. cPanel: open MultiPHP Manager. Plesk: open Websites & Domains, choose your domain and  click PHP Settings. 

5. Hosting provider: if you cannot see it, ask support which PHP build your site runs.

One caution for Linux servers: Ubuntu, Debian, AlmaLinux and others often ship fixes as “backports”  while keeping an older-looking version number. A version string alone can mislead. Check that the  package changelog names both CVEs: 

# Debian / Ubuntu apt changelog php8.4-fpm | grep -E “CVE-2026-10961[89]” # AlmaLinux / RHEL / Rocky rpm -q –changelog php-fpm | grep -E “CVE-2026-10961[89]”

How to Update Your PHP Version (Step by Step) 

Before you start 

• Take a full backup of your files and database. 

• Test on a staging copy first if you can. Moving within a branch, for example 8.3.35 to 8.3.36,  is low risk. Moving to a new branch, for example 7.4 to 8.3, can break old plugins and  themes. 

• Make a list of every place PHP runs, not only the main web server. 

Option 1: Shared hosting or cPanel 

1. Log in to cPanel and open MultiPHP Manager. 

2. Select your domain and choose a supported PHP branch (8.2, 8.3, 8.4 or 8.5), then apply. 

3. Ask your host to confirm in writing that they run 8.5.12, 8.4.27, 8.3.36, 8.2.35 or later, or a  vendor build that fixes both CVEs. The dropdown picks the branch; the host controls the  patch level. 

Option 2: Managed WordPress hosting 

Check the PHP setting in your hosting dashboard and contact support to confirm the patched build is  live. Do not assume it is, because many managed hosts patch on their own schedule. 

Option 3: Ubuntu or Debian VPS 

sudo apt update sudo apt upgrade php -v # Restart so running workers load the patched code (use your PHP version) sudo systemctl restart php8.4-fpm sudo systemctl restart apache2 # or: sudo systemctl reload nginx


If you need a newer branch than your distribution ships, many Debian and Ubuntu administrators  use the Ondřej Surý PHP repository. Plan that as a normal upgrade with testing, not a quick fix. 

Option 4: AlmaLinux, RHEL or Rocky Linux

sudo dnf upgrade “php*” sudo systemctl restart php-fpm sudo systemctl restart httpd


AlmaLinux moved patched PHP packages into its production repositories for every PHP stream on  versions 8, 9 and 10 on 21 October, so the testing repository is no longer needed. 

Option 5: Docker 

1. Change your base image to a patched tag such as php:8.4.27-apache, or to a newer  one on your branch. 

2. Rebuild without cached layers: docker build –pull –no-cache -t myapp . 

3. Redeploy, then confirm inside the running container: docker exec <container>  php -v 

Option 6: Windows, XAMPP or software that bundles PHP 

Check each product’s vendor for an update. If an app ships its own php.exe or php-cgi.exe, it will not  be updated when you update PHP elsewhere on the machine. 

After every update 

• Restart PHP workers (PHP-FPM and Apache or your web server). The flaws live in state held  by long-running workers, so a patched binary with old workers still serving traffic remains  vulnerable until restart. 

• Run php -v again and test key pages: login, checkout, forms and file uploads. • Check your PHP error log for new warnings caused by deprecated code. 

If an old plugin or custom feature is what keeps you on an unsupported PHP version, it is a sign the  site needs a planned migration or rebuild. Our guide to web development services explained shows  what that involves. 

Can’t Update Yet? Temporary Mitigations (Not a Fix) 

PHP states that updating is the only complete mitigation and that there is no complete generic  configuration fix. Use these steps only for servers you genuinely cannot patch today: 

• Disable upload progress to reduce exposure to CVE-2026-109619. Add this to php.ini or  your PHP-FPM pool configuration, then restart workers: 

session.upload_progress.enabled = 0 ; PHP 8.5 only fatal_error_backtraces = 0


• Check that no pool file or ini file in a subdirectory overrides these values.

• For CVE-2026-109618, PHP’s advisory lists memory and request-size settings. Follow the  exact values in PHP’s advisory (GHSA-w8hw-w9fx-j79w) rather than copying numbers from  blog posts. PHP also warns against using RLIMIT_AS or RLIMIT_DATA as a substitute. 

• If your applications do not use multipart file uploads, block multipart form data at the front  end, as PHP recommends. 

• Keep your WAF’s managed rules on. Cloudflare turned on protections for all plans on 21  October. A WAF is defense in depth, not a replacement for patching. 

• Move end-of-life servers behind a WAF or off the public internet until they are upgraded. 

CVE-2026-115560: The Follow-Up Flaw After the Patch 

On 23 October, PHP published information about CVE-2026-115560, a separate issue in the session  upload-progress feature. It affects fully patched releases, including 8.5.12, and PHP says a full  advisory and fix will come with its next regular release. PHP describes it as configuration dependent. 

Researchers reported that on patched servers, the upload-progress feature can still write attacker controlled data, such as a filename, into the session file. If your application also contains a local file  inclusion weakness, for example code like include($_GET[‘page’]), that combination can  lead to code execution. The practical advice is simple: 

• Keep the 21 October patches installed. 

• Set session.upload_progress.enabled = 0 if you do not use upload progress  bars. PHP recommends keeping it off even after patching if you do not need it. • Re-check any open file-inclusion findings in your code and treat them as critical. • Watch php.net for the next regular release and install it as soon as it appears. 

This guide reflects the situation as of 27 October 2026. Check the PHP security page for anything  newer. 

How to Tell If Your Server Was Already Attacked 

Patching stops future attacks but does not undo access an attacker already gained. The exploit can  run commands as the web server user without crashing the worker, so there may be no visible sign.  Look back at least to 20 October, and further if your logs allow. 

• PHP fatal errors in your web server log that mention “tried to allocate” and end with “in  Unknown on line 0”. 

• Unusual multipart POST requests followed by memory-limit errors or bursts of HTTP 500  responses, oversized PHPSESSID cookies, or unexplained worker restarts. 

• Web server or PHP processes launching shells (sh -c) with tools such as curl, wget, base64  or nc. 

• New or changed files in /tmp, /dev/shm, /var/tmp or the web root, including PHP files you  do not recognize.

• New cron jobs, changed SSH authorized_keys files, or outbound connections from the web  server user to unknown addresses. 

A compromised site can also lose search visibility, so after cleanup run a technical SEO check and  watch Google Search Console for warnings. 

Rotate Secrets If an Unpatched Server Handled Them 

PHP says one of the flaws allows an attacker to read memory from the PHP worker, which may hold  passwords, tokens, API keys and certificates belonging to other visitors’ requests. If an unpatched  server handled sensitive values after 20 October, assume they may be exposed and rotate: 

• Database passwords and WordPress admin passwords. 

• API keys for payment gateways, email services, cloud accounts and AI models. This matters  especially if you run AI agents or chatbots that call paid APIs from a PHP backend.

• OAuth client secrets and webhook signing secrets. 

• Active login sessions. Clear the session directory so old session files cannot be reused. 

PHP2Shell Security Checklist 

# Action Priority
1 List every server, container, control panel and bundled app  that runs PHPToday
2 Update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or newer), or a  vendor build that fixes both CVEsToday, internet-facing first
3 Restart PHP-FPM, Apache and any long-running workers Right after updating
4 Set session.upload_progress.enabled = 0 if you  do not use itToday
5 Keep WAF managed rules on while you patch Ongoing
6 Review logs and process activity from 20 October onward This week
7 Rotate passwords, API keys and secrets that touched  unpatched PHPThis week
8 Re-triage file-inclusion bugs in your own code This week
9 Plan migration off PHP 8.1 and older, and off 8.2 before 31  Dec 2026This month
10 Watch php.net for the release that fixes CVE-2026-115560 Ongoing


Wondering how the rest of your site measures up? Read Is your website ready for 2026? for a wider  look at performance, AI tools and security.

Frequently Asked Questions

PHP2Shell is the nickname for CVE-2026-109618 and CVE-2026-109619, two critical memory-safety  flaws in the PHP engine that allow unauthenticated remote code execution. PHP rates both 9.2 on  CVSS v4.0. 

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35, all released on 21 October 2026. PHP 8.1 and older are end of  life. Source backports exist for 7.4, 8.0 and 8.1, and Linux vendors may ship fixes under older-looking  version numbers. 

WordPress runs on PHP, so a WordPress site on an unpatched PHP version is exposed. The flaw is in  PHP, not in WordPress itself. 

No. You must update the PHP runtime through your hosting provider, operating system packages or  container image, then restart PHP workers. 

It contains the fixes for CVE-2026-109618 and CVE-2026-109619, but not for CVE-2026-115560,  which PHP plans to fix in its next regular release. Disable session.upload_progress if you do  not use it and keep monitoring. 

No. It only reduces exposure to the CVE-2026-109619 family and does nothing for CVE-2026-109618.  Updating PHP is the only complete fix. 

No. AI models helped researchers discover the flaws and build working exploits. The PHP project  wrote and released the fixes. 

A standard Shopify storefront runs on Shopify’s own infrastructure, so you do not patch PHP there.  Any PHP server you run separately, such as a blog or custom backend, needs the update. 

Need Help Updating or Auditing Your Website? 

Not sure which PHP version your site runs, or stuck on an end-of-life version because an old plugin  will not support anything newer? Easycomm’s web development team regularly handles code audits,  migrations and rebuilds, works with both WordPress and custom stacks, and offers post-launch  support and maintenance.

If you are choosing a partner, our checklist of questions to ask before hiring a software development  company is a good place to start. If you need extra engineering capacity, see how to hire dedicated  developers. Based in Rajasthan? Read about choosing a web development company in Jaipur. 

Ready to talk? Get in touch with the Easycomm team, or browse more guides on the Easycomm blog. 

Sources 

This article was researched on 27 October 2026 from the following sources: 

• PHP security advisory, 21 October 2026: https://www.php.net/index.php#2026-10-21-5 

• PHP advisory GHSA-w8hw-w9fx-j79w (CVE-2026-109618): https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w

• PHP advisory GHSA-6wmf-4rv5-p3rp (CVE-2026-109619): https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp

• Abstract Security, PHP2Shell flash report: https://www.abstract.security/blog/php2shell critical-php-rce-vulnerabilities-cve-2026-109618-and-cve-2026-109619 

• SandBase, PHP2Shell: AI Found a 14-Year-Old PHP Flaw: https://blog.sandbase.ai/php2shell-ai-found-php-flaw-builders-2026/

• OfficeChai, OpenAI’s GPT-5.6 Sol and the PHP flaw: https://officechai.com/ai/openais-gpt-5- 6-sol-helped-flag-the-critical-php-bug-flaw-thats-had-the-internet-scrambling/ 

• AlmaLinux, patched PHP packages: https://almalinux.org/blog/2026-10-21-php2shell-cve-2026-109618-cve-2026-109619/

• TuxCare, patches for end-of-life PHP: https://tuxcare.com/blog/php2shell-cve/ 

• SecureLayer7, PHP RCE update guidance: https://blog.securelayer7.net/php-rce-cve-2026- 109618-109619/

Hritik Pandey
Author

Hritik Pandey

Hritik Pandey is a Senior Software Engineer at EasyComm Innovations with 4+ years of experience in building scalable, high-performance web and mobile applications. He specializes in Web Development, Mobile App Development, Software Architecture, and AI-Based Solutions, focusing on delivering efficient, reliable, and user-centric digital products. At EasyComm, Hritik contributes to end-to-end development and shares practical insights based on real-world project experience.

Scroll to Top