DEV Community

Cover image for PHP2Shell: The Patch Was Not the Start of the Incident
Yano.AI Technologies Inc.
Yano.AI Technologies Inc.

Posted on Originally published at yanoai.tech

PHP2Shell: The Patch Was Not the Start of the Incident

Four days before the PHP security team published its advisory on the php2shell flaws, Amazon Threat Intelligence had already caught an exploitation attempt against its honeypot network on 17 October 2026 (Source: Amazon Threat Intelligence, 2026). In the Philippines that gap is not academic, because the National Privacy Commission requires a personal information controller to notify it within 72 hours of knowing or reasonably believing a breach has occurred (Source: National Privacy Commission, 2016). The Department of Information and Communications Technology separately requires government agencies to fix critical vulnerabilities within five business days (Source: Newsbytes.PH, 2026).

Infographic

What actually broke

PHP shipped fixed versions 8.2.35, 8.3.36, 8.4.27 and 8.5.12 on 21 October 2026, covering two flaws: CVE-2026-109618, remote code execution through out-of-memory corruption, and CVE-2026-109619, remote code execution through stale global state left by an earlier request (Source: PHP, 2026). The PHP security team rates both at CVSS v4.0 9.2, and the US National Vulnerability Database scores CVE-2026-109618 at 9.8 on the older CVSS 3.1 scale (Source: NIST, 2026).

The vulnerable code path dates back to PHP 5.4.0, released in 2012 (Source: Tenable, 2026). Every PHP installation serving web requests is affected, and the PHP team considers risk highest for Apache with mod_php, where a demonstrated exploit can trigger before any application code runs (Source: PHP, 2026). PHP runs on 69.3 percent of websites whose server-side language is known, and 7.7 percent of PHP sites still run the end-of-life 5.x branch (Source: W3Techs, 2026).

The clock started before the advisory

Two teams reached opposite conclusions within 24 hours, and both are worth holding. Sansec reported on 22 October that mass exploitation was less likely than first expected, because the public proof-of-concept exploits do not work against a default PHP installation (Source: Sansec, 2026). Tenable reported on the same date that php2shell was being broadly exploited in the wild (Source: Tenable, 2026).

Amazon Threat Intelligence recommends starting investigations from at least 17 October, not the disclosure date, and argues that the gap between a patch and a working exploit keeps shrinking, partly because AI-assisted analysis turns a patch diff into an exploit faster (Source: Amazon Threat Intelligence, 2026). CISA advises organisations that cannot update immediately, or that run unsupported PHP 8.1 and earlier, to take PHP-based systems offline until they can be patched (Source: CISA, 2026).

Why a memory bug becomes a privacy incident

CVE-2026-109618 does more than execute code. PHP's upload-progress handler can return freed worker memory to the client inside a PHPSESSID cookie, and that memory can hold passwords, session tokens, API keys and TLS private keys from other requests (Source: Sansec, 2026).

That is where Philippine rules engage. Section 14 of NPC Circular 16-03 states that discovery of a vulnerability allowing access to personal data shall prompt the controller to assess whether a personal data breach has occurred (Source: National Privacy Commission, 2016). Section 11 lists usernames, passwords and other login data among the information that triggers notification when there is reason to believe it was acquired without authorization and a real risk of serious harm exists (Source: National Privacy Commission, 2016).

Section 22 reaches beyond notification. Every security incident and personal data breach must be documented in written reports, including those below the notification threshold, and a summary goes to the Commission annually (Source: National Privacy Commission, 2016). For 2025, that window is open until 10 November 2026, it must go through the Data Breach Notification Management System rather than email, and a zero-incident report is still required (Source: National Privacy Commission, 2026).

A workplan for 72 hours

  • Inventory every host running PHP, including hosts where PHP arrives as a dependency of WordPress or Laravel rather than a deliberate install (Source: CISA, 2026).
  • Move to a fixed PHP release and restart every worker (Source: PHP, 2026).
  • If patching is not immediate, set session.upload_progress.enabled to 0 and memory_limit to -1 where applications cannot override them, then restart every worker (Source: PHP, 2026).
  • Hunt web server logs for POST requests carrying the PHP_SESSION_UPLOAD_PROGRESS string in multipart form bodies, and for PHP workers launching shells (Source: Amazon Threat Intelligence, 2026).
  • Deploy the community Suricata, Sigma and ModSecurity detection rules before patching finishes, so the alert arrives with the fix (Source: GitHub, 2026).

Yano.AI applies this same priority order inside its Cognitive AI approach to security operations: rank exposure by what is internet-facing and exploitable, close it, then prove what happened from logs rather than assumption. Machines read the log volume; the judgement about what constitutes a notifiable breach stays with the people who own the data.

FAQ

Q: Do I need to worry if my site is not built on PHP?

A: Yes, if PHP is present at all. The flaws sit in the PHP engine, so a Magento or WooCommerce store can be affected even when its own code is clean (Source: Sansec, 2026). WordPress alone is 39.6 percent of all websites, and it runs on PHP (Source: W3Techs, 2026).

Q: What if we run an end-of-life PHP version?

A: PHP no longer publishes official releases for 8.1 and older, but the security team published minimal source backports for 7.4, 8.0 and 8.1, and some vendors backported the fix into packaged builds (Source: PHP, 2026). PHP 8.2 itself reaches end of life on 31 December 2026 (Source: PHP, 2026).

Q: If we find no evidence of compromise, do we still have a reporting duty?

A: Yes. Section 22 of NPC Circular 16-03 requires written documentation of every security incident, including those below the notification threshold (Source: National Privacy Commission, 2016). The 2025 Annual Security Incident Report must still be filed through the DBNMS by 10 November 2026 (Source: National Privacy Commission, 2026).

Key Takeaway

The disclosure date was not the beginning. Exposure started on 17 October 2026, and by the time PHP shipped the fix, working exploits were already circulating against it (Source: Amazon Threat Intelligence, 2026). For Philippine organisations, patching and reporting are the same job: inventory, patch, hunt from 17 October, and document everything, including incidents that never crossed the notification threshold. What PHP version is running on your most exposed server right now, and who signs the report to the National Privacy Commission if it was compromised?

Sources

Top comments (0)