Vulnerabilities

PHP2Shell: patch PHP now, then check whether attackers got in first

Two critical PHP flaws, CVE-2026-109618 and CVE-2026-109619, are now exploited. What happened, why version numbers mislead, and what to do after patching.

All articles

On 21 October 2026, the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix two critical vulnerabilities that, in the project’s words, “can allow unauthenticated remote code execution.” Tracked as CVE-2026-109618 and CVE-2026-109619 and nicknamed PHP2Shell, both are rated 9.2 on CVSS v4.0. The advisory says every PHP installation serving web requests is at risk, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed, and that the risk is highest for mod_php, “with a demonstrated exploit where an unauthenticated request can trigger the attack before any application code runs.”

A week later, the question has shifted from whether the flaws can be exploited to whether they already were. On 26 October, CISA added both CVEs to its Known Exploited Vulnerabilities (KEV) catalog, and BleepingComputer reported the first confirmed remote code execution in the wild. For businesses in Vietnam and Southeast Asia, where PHP sits under many company websites, online stores and hosting control panels, the work has two parts: patch every PHP runtime, including the ones hidden inside other products, and then check whether anyone got in before the patch.

What happened

  • 11 August: During an audit under OpenAI’s Patch the Planet program, researcher Ryan A at the security firm Calif reports an unconditional remote code execution with the same root cause as an out-of-memory (OOM) problem PHP developers had found in 2024, according to the PHP Foundation. OpenAI independently reports the same root cause; Wiz adds attack vectors on 24 August and OpenAI on 18 September. Calif is run by Thai Duong (Dương Ngọc Thái), an engineer born in Ho Chi Minh City, Dân trí reports.
  • 17 October: Amazon Threat Intelligence sees the first exploitation attempt against one of its honeypots, from a commercial anonymization network, four days before the patch. Amazon said it was unclear whether the attempts “would have succeeded in real-world systems,” BleepingComputer reported.
  • 20 October: Around 15:00 UTC, the two CVE IDs start circulating online with a wrong release time and a wrong CVSS score of 10.0, but no technical details. PHP publishes a pre-announcement at 19:30 UTC and moves the release forward one day. Around 20:00 UTC, Calif mistakenly publishes a video of its proof of concept; copies spread, and the Foundation says the video “contributed to accelerated development of various PoCs.”
  • 21 October: At 07:41 UTC, Chainguard publishes patched images more than six hours before the coordinated release, which the Foundation says broke the embargo. PHP publishes the fixed versions that day, as rescheduled for 14:00 UTC (21:00 in Vietnam). The PHP security team says it found no functional exploit among the circulating PoCs at release time. Cloudflare’s chief executive, Matthew Prince, said the network saw thousands of exploitation attempts in the 10 hours before the announcement, then “tens of thousands in the 45 minutes post announcement, hundreds of thousands within two hours, and millions now,” Reuters reported.
  • 22 October: Nomura, Mitsubishi UFJ Financial Group, ANA and East Japan Railway temporarily suspend some internet services; Japan’s Ministry of Finance and Meteorological Agency partially suspend online services, and the National Tax Agency takes its service down for a time. South Korea raises its private-sector cybersecurity alert level. Dataminr still describes the activity as “limited to scanning, fingerprinting, and use of non-working exploits, with no known compromises.”
  • 23 October: SoftBank suspends its emergency alert system for mobile users while it fixes a PHP vulnerability, Reuters reports. CISA adds a SIGMA detection rule to its alert. Singapore’s CSA publishes monitoring guidance and says it is aware of “widespread exploitation attempts.” PHP posts an informational advisory on a third, unlikely vector, CVE-2026-115560.
  • 24 October: A honeypot run by Adel Karimi, detection and response lead at Perplexity, records confirmed remote code execution against Apache mod_php running PHP 8.4.26, one release behind the fix. The payload used a function address derived “using the public exploit’s offsets.” Karimi cautioned that the evidence covers “the intentionally favorable single-worker mod_php profile.”
  • 26 October: CISA adds both flaws to KEV and, BleepingComputer reports, gives US federal civilian agencies until Thursday, 29 October, to secure their systems under Binding Operational Directive 26-04.

What the two flaws are

CVE-2026-109618, “RCE via OOM corruption”: out-of-memory handling can interrupt PHP while internal request data is only partially initialized, and request cleanup may then treat the invalid data as valid. CVE-2026-109619, “RCE via stale global state”: request-owned internal state can survive after its memory has been freed, and a later request handled by the same worker may use it. The Foundation notes that both sit in memory management and error handling, “parts of PHP that nearly every request touches.” The CVE record rates attack complexity as high, which slowed attackers down but did not stop them.

Why it matters

The flaw is in the runtime, not in your code. Clean code and current plugins do not help when, on mod_php, the trigger fires before the application runs. PHP sits under WordPress, Drupal and Joomla, and BleepingComputer cites VirusTotal estimates of more than 5.1 million PHP hosts exposed online. It also powers frameworks such as Laravel and Symfony and server control panels such as cPanel and Plesk, VnExpress notes, citing BuiltWith data that 143,000 active websites in Vietnam use PHP and quoting Vietnam’s National Cybersecurity Association that the risk to each system depends on factors such as the PHP version in use and how the website is deployed.

Old branches are on their own. Google lists all versions from 5.4 through 8.5.11 as vulnerable. PHP 8.1 and older receive no releases from the PHP project; the security team published minimal source backports for 7.4, 8.0 and 8.1, which help only those who build PHP themselves. CISA says organizations that cannot update immediately, or that still run 8.1 or earlier, should take PHP-based systems offline until they are patched. PHP 8.2 got a fix this time, but it reaches end of life on 31 December 2026.

A version string can mislead in both directions. Linux distributions backport fixes without adopting the upstream version number. On Ubuntu 24.04 LTS, the fixed package is 8.3.6-0ubuntu0.24.04.13: it reads “8.3.6” while the upstream fix is 8.3.36. Ubuntu 22.04 LTS ships a fixed PHP 8.1 build, 8.1.2-1ubuntu2.28, on a branch PHP itself no longer supports. A scanner that compares version strings may flag a patched server, and a team that sees “8.1” may wrongly conclude no fix exists. Google recommends checking the package changelog for the two CVE IDs instead, and warns that upgrading packages on disk “leaves vulnerable libphp.so or php-fpm binaries resident in running worker processes” until they are restarted.

Hosting customers depend on someone else’s patch. On shared hosting and managed control panels, the runtime belongs to the provider. Smaller organizations “may run a website using PHP but don’t really keep a close eye on it,” Felix Kuhlenkamp of the German industry association Bitkom told Reuters, and a site on a version with no security update needs the whole system upgraded.

Exploitation began before the patch. AWS chief information security officer CJ Moses warned that “defenders should not assume the public disclosure date is the earliest date of exploitation.” A server patched on 21 October may still have been probed from 17 October, and one patched today has faced public exploit code for several days.

Where a WAF fits

A web application firewall (WAF) “may provide some protection until systems are updated or patched,” CISA says. Google says its Cloud Armor mitigations “serve solely as compensating controls,” and PHP says its configuration workarounds “reduce exposure to specific attack paths but do not make an installation safe.” As we argued in our PeopleSoft analysis, a virtual patch is a bridge measured in days, with an owner and an end date, not a substitute for the update.

What to do now

  1. Inventory every PHP runtime, not just websites. CISA notes that PHP “is often a component of other software and prevalence may not be directly observable.” CSA asks organizations to check web servers even where the main website does not use PHP. Include control panels, internal tools, container images and appliances: Google warns that edge, gateway, management, storage and security systems often embed PHP.
  2. Patch, verify and restart. Move to 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or install your distribution’s backported package. Confirm the fix by searching the package changelog for both CVE IDs, then restart php-fpm, apache2/httpd, frankenphp or lsws, and rebuild and redeploy container images.
  3. Retire 8.1 and older. Upgrade to a supported branch, use a vendor that provides backports, or take the system offline as CISA advises. Plan the move off 8.2 before 31 December.
  4. Get answers from your hosting provider and agencies. Ask in writing which PHP versions and builds your sites run, when they were patched and restarted, and what was checked afterwards. If the provider cannot answer, consider suspending the site until it can.
  5. Use workarounds only as a bridge. PHP lists temporary settings: session.upload_progress.enabled=0 set in php.ini or the FPM pool (not via ini_set() or .user.ini), memory_limit=-1 enforced with php_admin_value, a low post_max_size, and fatal_error_backtraces=0 on PHP 8.5, with every worker restarted. Keep upload progress disabled after patching until the next regular release, because of CVE-2026-115560.
  6. Hunt back to 17 October. On hosts that show probing, capture worker memory before restarting, since a restart destroys the evidence, Google advises. Alert on sh, bash, curl or wget started by php-fpm, httpd or apache2; on outbound PHPSESSID cookies longer than 256 bytes, which can indicate memory leaks; and on spikes in worker crashes. Run CISA’s SIGMA rule against your logs.
  7. Treat confirmed code execution as a full compromise. Rotate every secret the web server account can read (database passwords, API keys, cloud credentials) and rebuild the host rather than clean it. Google also recommends blocking outbound internet access from PHP servers.

Era Artech’s perspective

The PHP Foundation openly calls its delay in fixing a root cause first spotted in 2024 “a structural failure,” and a leak, an accidental video and an early binary release then shrank the time defenders had. For most organizations, though, the deciding factor was whether they knew where their PHP runtimes were and who was responsible for updating them. For each critical, exploited flaw, we recommend recording two dates per system (the day the fix was verified and the processes restarted, and the day the compromise check was finished) and treating the system as open risk until both exist.

Sources

  1. Security advisory: Critical remote code execution vulnerabilities, update now The PHP Group (php.net) ·
  2. Today's PHP Security Release, and How We're Strengthening PHP Security The PHP Foundation ·
  3. CVE-2026-109618: RCE via OOM corruption CVE Program (cve.org) ·
  4. Critical Vulnerabilities in PHP Require Immediate Patching Cybersecurity and Infrastructure Security Agency (CISA) ·
  5. Responding to core PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619 Google Cloud ·
  6. Critical Vulnerabilities in PHP (PHP2Shell) Cyber Security Agency of Singapore (CSA) ·
  7. USN-8948-1: PHP vulnerabilities Ubuntu (Canonical) ·
  8. Amazon says PHP2Shell exploitation began 4 days before patches BleepingComputer ·
  9. Hacking attempts surge as companies, governments rush to patch PHP flaws The Straits Times (Reuters) ·
  10. Japan to Simulate Cyberattacks as PHP Flaws Roil Global Internet U.S. News & World Report (Reuters) ·
  11. Công ty của kỹ sư người Việt phát hiện "lỗ hổng" đe dọa 70% website toàn cầu Dân trí ·
  12. Lỗ hổng PHP2Shell - khi AI làm đảo lộn giới an ninh mạng VnExpress ·
  13. PHP2Shell exploitation observed: packet-to-process RCE evidence Adel Karimi (honeypot-data on GitHub) ·
  14. PHP2Shell security flaws now sucessfully exploited in the wild BleepingComputer ·
  15. CISA confirms PHP2Shell vulnerabilities now exploited in attacks BleepingComputer ·

This analysis reflects information that was publicly available on its publication date. It is provided for general information only and is not legal or professional advice.

Need help assessing your exposure?

Our team can review your systems against the issues discussed here and help you prioritize fixes.

Talk to our security team