10/23/2026
PHP2Shell: I Put My Oxygen Mask on First. Now, Here's How to Contain the Twin PHP Vulnerabilities.
A Practical Step-by-Step Guide to CVE-2026-109618 and CVE-2026-109619
For those who fly, there is a familiar safety instruction given before every flight: "Put on your own oxygen mask first before assisting others."
I just did.
When news broke about the two critical PHP vulnerabilities, my immediate responsibility was to get my own environment under control. That required focus, coordination, and a systematic approach to identifying and reducing exposure across a complex hybrid infrastructure.
Now that I have brought my environment under control, I am reaching out to share a practical approach that may help other cybersecurity professionals facing the same challenge.
The vulnerabilities, CVE-2026-109618 and CVE-2026-109619, each carry a critical CVSS v4.0 score of 9.2 and can potentially allow unauthenticated remote code ex*****on. What makes them particularly concerning is that they affect the PHP runtime itself, not simply a particular website, plugin, or content management system. They can affect Apache mod_php, PHP-FPM, and other PHP web-serving configurations.
For organizations managing thousands of assets across on-premises infrastructure, cloud environments, containers, and third-party applications, the biggest challenge may not be applying the patches.
It is knowing where every vulnerable PHP instance exists.
Here is the step-by-step response framework I recommend.
STEP 1: UNDERSTAND THE THREAT BEFORE TAKING ACTION
Start with the official PHP security advisories. Understand the affected versions, exploitation conditions, and available fixes. The two vulnerabilities involve different memory-safety failures.
CVE-2026-109618 involves memory corruption during out-of-memory handling.
CVE-2026-109619 involves a use-after-free condition involving stale internal state retained between requests.
Do not assume that a server is safe simply because it does not run WordPress or another popular PHP-based application. The exposure exists at the PHP runtime layer. Any application serving requests through an affected PHP installation deserves evaluation.
STEP 2: ESTABLISH VISIBILITY ACROSS THE ENTIRE ENVIRONMENT BEGINNING WITH INTERNET-FACING ASSETS FIRST
This is arguably the most important step. In a large hybrid infrastructure, PHP may exist in places where you least expect it.
Start by examining on-premises Windows and Linux servers, cloud virtual machines, managed application environments, Docker containers, Kubernetes workloads, web servers, application servers, embedded PHP components, development environments, testing environments, production systems, third-party products, and legacy applications.
Leverage your Configuration Management Database (CMDB), cloud asset inventories, endpoint management tools, container registries, and software bills of materials.
Do not rely on vulnerability scanners alone. A scanner may not yet have an updated detection signature. It may also lack credentials, miss an embedded PHP runtime, or fail to identify software inside an ephemeral container. A missing vulnerability finding does not establish that a system is safe.
STEP 3: PERFORM INDEPENDENT PHP DISCOVERY
Supplement traditional vulnerability scanning with direct software inventory.
Use endpoint detection and response (EDR) tools, operating-system package inventories, software discovery tools, and configuration management platforms.
Where appropriate, run controlled queries to identify installed PHP packages and versions, PHP executables and their filesystem locations, running PHP-FPM and Apache processes, loaded PHP web-server modules, PHP runtimes packaged into container images, and applications that bundle their own PHP installations.
On Linux, commands such as php -v and package-manager queries provide useful starting points.
However, remember that the command-line PHP version may differ from the PHP version used by the web server.
Correlate installed software with the actual processes serving requests.
The objective is to establish visibility independently of whether a vulnerability plugin exists.
STEP 4: BUILD A CENTRALIZED EXPOSURE REGISTER
Once potentially affected assets have been identified, consolidate the findings into a single inventory.
For each asset, capture its hostname, IP address, business application, infrastructure owner, PHP version, deployment type, internet accessibility, business criticality, and remediation status.
Include a field documenting how the PHP installation was discovered and whether its vulnerability status has been validated.
Classify assets as confirmed vulnerable, potentially vulnerable or requiring validation, remediated and verified, or not affected with supporting evidence.
Pay particular attention to assets that appear in cloud inventories but not in traditional vulnerability management platforms.
Those gaps often reveal unmanaged infrastructure.
STEP 5: PRIORITIZE BASED ON ACTUAL EXPOSURE
Not every affected asset represents the same immediate risk.
Begin with internet-facing applications, particularly those running Apache mod_php, which the PHP security advisories identify as especially concerning.
Next, prioritize critical business systems, externally accessible services, and environments with sensitive information or elevated application privileges.
Ask yourself the following questions.
Can an unauthenticated attacker reach the PHP service?
Is the service publicly accessible through a proxy, load balancer, or application gateway?
What business processes would be affected if the server were compromised?
Is the PHP runtime isolated, or does it have access to other critical systems?
Do not ignore internal installations. A vulnerable internal service can still become an attack path following an initial compromise elsewhere.
STEP 6: CONTAIN EXPOSURE IMMEDIATELY
Where patching cannot happen immediately, reduce the attack surface while remediation proceeds.
Depending on the environment, consider temporarily removing vulnerable applications from public access, restricting access through network controls, VPNs, or allowlists, disabling unnecessary PHP endpoints and functionality, applying appropriate request restrictions at web servers and reverse proxies, and closely monitoring suspicious requests and abnormal PHP worker behavior.
Web application firewall rules and request filtering can provide additional protection, but they should not be considered complete remediation.
If an exposed service cannot be adequately protected and patched promptly, temporary isolation may be the safest decision.
STEP 7: APPLY VENDOR-RECOMMENDED TEMPORARY MITIGATIONS
The PHP security team has published specific temporary measures for organizations unable to patch immediately.
For CVE-2026-109618, administrators may enforce memory_limit=-1 at a configuration level that applications cannot override.
This reduces a confirmed attack path, but can introduce resource-exhaustion risks and requires independent memory controls.
For CVE-2026-109619, disabling session.upload_progress.enabled can block confirmed session-related exploitation paths.
On PHP 8.5, disabling fatal_error_backtraces addresses another confirmed path.
These settings must be applied in the appropriate server configuration before request processing, and affected workers must be restarted.
Administrators should also assess upload limits and multipart request handling.
Important: None of these workarounds completely eliminates the vulnerabilities. Updating PHP with both security fixes remains the only complete remediation.
STEP 8: PATCH AND REMEDIATE AFFECTED INSTALLATIONS
On October 21, 2026, PHP released the following security updates.
PHP 8.2: Minimum fixed version 8.2.35
PHP 8.3: Minimum fixed version 8.3.36
PHP 8.4: Minimum fixed version 8.4.27
PHP 8.5: Minimum fixed version 8.5.12
Organizations using vendor-maintained distributions must verify whether both fixes have been backported into their packages.
An upstream version number alone may not establish patch status.
For unsupported PHP versions, investigate vendor-provided security backports or prioritize migration to supported releases.
Coordinate emergency changes with application owners, test business-critical functionality, deploy updates in controlled waves where necessary, and restart affected services.
Remember to rebuild vulnerable container images and update deployment templates.
Otherwise, patched systems may become vulnerable again during the next deployment.
STEP 9: INVESTIGATE POSSIBLE EXPLOITATION
Containment and patching address exposure, but they do not establish whether compromise has already occurred.
Work with your Security Operations Center or incident response team to investigate potentially affected systems.
Review relevant telemetry for unusual multipart HTTP requests, repeated PHP worker crashes, memory-exhaustion events, abnormal child processes, suspicious file changes, and unexpected outbound connections.
Correlate network, application, system, and EDR telemetry.
These are investigative leads, not definitive indicators of exploitation.
If compromise is suspected, preserve relevant evidence and activate established incident response procedures before making changes that could destroy useful forensic information.
The absence of suspicious logs is not proof that exploitation did not occur.
STEP 10: VALIDATE REMEDIATION AND MAINTAIN CONTINUOUS MONITORING
Never close a critical vulnerability solely because a patching team reports that an update was installed.
Independently verify that the affected PHP installation was identified correctly, the appropriate security fix was installed, the running web service is actually using the patched runtime, all relevant worker processes have restarted, previously exposed application routes are no longer vulnerable, and container images, deployment pipelines, and infrastructure templates have been updated.
Ensure unresolved assets and exceptions remain visible and assigned to accountable owners.
Use authenticated vulnerability scans, direct version and package verification, process inspection, and configuration checks.
Continue monitoring for emerging exploitation techniques and newly discovered PHP installations.
FINAL THOUGHTS: VISIBILITY IS THE FOUNDATION OF VULNERABILITY MANAGEMENT
This incident reinforces an important cybersecurity principle.
You cannot secure what you do not know exists.
Vulnerability scanners are essential, but they are not substitutes for comprehensive asset visibility, independent software discovery, and technical validation.
In a complex hybrid environment, effective vulnerability management requires collaboration between security, infrastructure, cloud engineering, application development, and incident response teams.
It also requires understanding the difference between identifying a vulnerability, containing its exposure, investigating possible compromise, and fully remediating the underlying weakness.
Those are separate but interconnected responsibilities.
For my part, I chose to follow the same principle we hear during every flight.
Put your oxygen mask on first. Secure your own environment. Then help others.
My immediate environment is now under control, and I hope this practical framework helps fellow cybersecurity professionals protect theirs.
Stay vigilant. Validate your visibility. Prioritize exposure. Patch decisively.
TECHNICAL REFERENCES
PHP Official Security Announcements, October 21, 2026
https://www.php.net/archive/2026.php
PHP Advisory: CVE-2026-109618
https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w
PHP Advisory: CVE-2026-109619
https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp
Rapid7: Critical Unauthenticated Remote Code Ex*****on in PHP
https://www.rapid7.com/blog/post/etr-cve-2026-109618-and-cve-2026-109619-critical-unauthenticated-remote-code-ex*****on-in-php/
Akotarh Akoson