Active CVE-2026-109618 · CVE-2026-109619 Updated

php2shell: critical remote code execution in PHP

Two critical bugs in PHP itself let attackers run code on your server, reportedly without logging in. It doesn't matter which app or framework you run. A working exploit has leaked. Fixed PHP builds are due 21 Oct 2026, 14:00 UTC. Until then, work through the steps below.

Severity
CriticalCVSS 4.0 9.2, both CVEs
Fixed builds
21 Oct, 14:00 UTCMay ship earlier if exploitation spreads
Exploit
LeakedTool and demo video public
Affected
PHP 5.4+Reported; official list due with the fix

Do this now

Work from the top. Steps marked Unofficial come from researcher root-cause analysis that PHP hasn't confirmed. They're low-risk and reversible, but not a substitute for the patch. Everything else follows PHP and CERT guidance.

  1. Find every PHP install, and the php.ini your web server loads

    Include PHP inside vendor appliances, control panels and containers. php --ini shows the CLI config; web requests use the FPM or Apache one, usually at a different path.

    shell
    php -v
    php-fpm8.3 -i | grep "Loaded Configuration File"  # Debian/Ubuntu, match your version
    php-fpm -i    | grep "Loaded Configuration File"  # RHEL / Alma / Rocky
    Where php.ini usually is
    Debian / Ubuntu, PHP-FPM/etc/php/8.3/fpm/php.ini
    Debian / Ubuntu, mod_php/etc/php/8.3/apache2/php.ini
    RHEL / Alma / Rocky / Amazon/etc/php.ini
    Docker php:* imagesDrop-in: /usr/local/etc/php/conf.d/zz-php2shell.ini
    cPanel / Plesk / shared hostingMultiPHP INI Editor or PHP Settings, or .user.ini in the web root
  2. Unofficial stopgap

    Turn off session.upload_progress, then reload PHP

    Researcher analysis puts one of the flaws in this handler. Almost no site needs it, and the change is reversible. Edit the web server's php.ini from step 1, not the CLI one.

    php.ini
    session.upload_progress.enabled = Off
    shell
    sudo systemctl reload php8.3-fpm    # Debian/Ubuntu FPM (match your version)
    sudo systemctl reload php-fpm       # RHEL family FPM
    sudo systemctl reload apache2       # mod_php (httpd on RHEL)
    php-fpm8.3 -i | grep upload_progress.enabled   # verify: should print Off
    Can't edit php.ini? Equivalent settings
    FPM pool (pool.d/www.conf)php_admin_flag[session.upload_progress.enabled] = off
    Apache mod_php vhostphp_admin_flag session.upload_progress.enabled Off
    Shared hosting (FPM/CGI).user.ini in the web root; picked up within about 5 minutes
  3. Unofficial stopgap

    Block multipart/form-data POSTs you don't need

    The second suspected path is the multipart parser itself, which runs on any multipart POST regardless of step 2. No uploads on the site? Block multipart entirely. Need uploads? Allow-list those paths and block the rest. This reduces exposure; it doesn't remove the bug.

    On Cloudflare? It added emergency WAF rules on 21 Oct that apply automatically on the Free plan; paid plans need the Cloudflare Managed Ruleset deployed. Cloudflare hasn't tied them to these CVEs. Details below.

    nginx

    Add this line to each server {} block that passes requests to PHP. It blocks every multipart POST, file uploads included, so use it only if the site doesn't need uploads.

    nginx
    if ($content_type ~* "^multipart/form-data") { return 403; }
    shell
    sudo nginx -t && sudo systemctl reload nginx
    Apache 2.4 (vhost or .htaccess)
    apache
    RewriteEngine On
    RewriteCond %{HTTP:Content-Type} ^multipart/form-data [NC]
    # Allow-list your real upload endpoint(s). Delete the next line to block all multipart.
    RewriteCond %{REQUEST_URI} !^/wp-admin/async-upload\.php$
    RewriteRule ^ - [F]
    
    # Optional: cap request bodies where uploads aren't expected (not on upload paths)
    # LimitRequestBody 1048576
    shell
    sudo apachectl configtest && sudo systemctl reload apache2   # httpd on RHEL
    Cloudflare WAF

    Managed rules. Cloudflare released emergency WAF rules on 21 Oct (references). On the Free plan they're in the Free Managed Ruleset, which is on by default unless someone turned it off; it inspects only the first 1 MB of a request body. On paid plans they're in the Cloudflare Managed Ruleset: check it's deployed under Security → WAF → Managed rules. Cloudflare hasn't said they target php2shell; its posts describe generic “anomalous execution” rules released the same day.

    Custom rule (extra layer). Security → WAF → Custom rules, action Block (or Managed Challenge). Edit the allow-listed paths.

    rule expression
    http.request.method eq "POST"
    and starts_with(lower(http.request.headers["content-type"][0]), "multipart/form-data")
    and not http.request.uri.path in {"/wp-admin/async-upload.php"}

    Both only protect traffic that goes through Cloudflare. Restrict your server to Cloudflare's IP ranges so attackers can't reach it directly.

  4. Take end-of-life PHP off the internet

    PHP 8.1 and older, all 7.x and all 5.x get no fix. Firewall it, put it behind a VPN, or serve a maintenance page until it's upgraded to 8.2 or later.

  5. Patch the moment fixed builds ship

    Due for 8.2, 8.3, 8.4 and 8.5 (latest releases before the fix: 8.5.11, 8.4.26, 8.3.35, 8.2.34). PHP may ship earlier if exploitation spreads. Have the update staged: mass scanning is expected within minutes of release. On managed hosting, open a ticket now and ask them to stand by.

    Update commands
    Debian / Ubuntusudo apt update && sudo apt upgrade
    RHEL / Alma / Rockysudo dnf upgrade 'php*'
    Docker php:* imagesPull the new tag, rebuild, redeploy
    WindowsNew build from windows.php.net

    Then reload PHP-FPM or Apache as in step 2. Distro packages often backport fixes without changing PHP's version number, so check your vendor's security tracker rather than comparing against php.net versions.

  6. After patching, check for compromise

    Look for new web shells, unexpected cron jobs, services or users, and odd outbound connections. Detection lists the signals. Found something? Treat it as an incident.

What we know

Is it real?
Confirmed On 20 Oct 2026 PHP's security team pre-announced an emergency release for two critical RCEs. Details leaked ahead of coordinated disclosure. watchTowr has reproduced CVE-2026-109618.
Is there an exploit?
Reported A tool called “php2shell” (credited to Calif.IO) was shown compromising WordPress, Magento, Joomla, Drupal, Laravel, Symfony, phpBB, MediaWiki and WHMCS. It claims to work on every PHP release from 5.4.0 onward. A demo video is public.
Exploited in the wild?
Unconfirmed Huntress and watchTowr report no confirmed mass exploitation at time of writing. Researchers sharing the video, such as Kirill Firsov, consider it in the wild.
What happens at release?
Expected Sansec expects mass attacks within 15 minutes of the patch, because the fix reveals the bug.
Vendor protections
Vendor Cloudflare released emergency WAF rules on 21 Oct, on by default for Free plans. It hasn't said they target php2shell: its posts describe generic “anomalous execution” rules and name no CVEs. WAF rules reduce exposure; they don't replace the patch.
Root cause and versions
Pending Official details publish with the release. Until then, anything unconfirmed on this page is labelled.

“All PHP users are encouraged to prepare now so they can upgrade as soon as the release is available. We reserve the right to release earlier should details of either vulnerability become public, or should evidence of active exploitation appear in the wild.”

PHP security team, official announcement

CVE records

CVEScoreNotesRecords
CVE-2026-109618CVSS 4.0 9.2Reproduced by watchTowrCVE.org · NVD
CVE-2026-109619CVSS 4.0 9.2—CVE.org · NVD

Early leaks said CVSS 10.0. The official score is 9.2 (CVSS v4.0) for each.

Affected versions

Pending From researcher reporting and the tool's own claims. Verify against the official advisory when it lands.

PHPExposureOfficial fixWhat to do
8.2 – 8.5 supportedReported affectedDue 21 OctPatch on release
8.0 – 8.1 EOLReported affectedNoneUpgrade or isolate
7.x EOLReported affectedNoneUpgrade or take offline
5.4 – 5.6 EOLTool claims 5.4.0+NoneIsolate now; migrate

Detection

No reliable public signatures yet. The durable signal is a PHP or web-server worker spawning something it never should (per Huntress and Florian Roth's process-watcher).

Parent processphp-fpm php-cgi php-cgi.exe apache2 httpd
Child shellssh bash cmd.exe powershell.exe
Child toolspython perl curl wget nc certutil.exe
Recon from the web serverwhoami id uname -a ipconfig
Reverse-shell strings/dev/tcp/ fsockopen mkfifo
Access logsBursts of multipart/form-data POSTs to endpoints that don't take uploads
quick host checks (Linux)
# Shells or tools running under php-fpm / apache2 / httpd?
ps -eo pid,ppid,user,etime,args --forest | less
# PHP files changed in the last 3 days (adjust the web root)
find /var/www -name '*.php' -mtime -3 -ls
# New or changed cron jobs?
sudo ls -laR /etc/cron.d /var/spool/cron

FAQ

I'm on managed or shared hosting. What do I do?

Open a ticket today. Confirm your PHP version, ask them to apply the 21 Oct release as soon as it ships, and to move you off anything at 8.1 or older. If you can, apply step 2 with a .user.ini file. You can't fix this from your app code.

Will a WordPress, Magento or Laravel plugin protect me?

Not reliably. The flaw is in PHP, below your app. Edge rules (step 3) are defence in depth. The only complete fix is updating PHP.

Is step 2 enough on its own?

No. It's an unofficial, reversible stopgap that may close one of two paths. Do steps 2 and 3, then patch.

Can I see the exploit?

This site doesn't host or link exploit code for attacking systems. Researcher analysis is linked for defenders and labelled where it contains PoC material.

References

Official and technical sources first.

Official & authoritative

Technical analysis & research

Vendor WAF rules

News & reporting

Researcher & social posts