First Take

Fix PHP Now, but Fix Vulnerability Management Next

Cybersecurity, software engineering and I&O leaders must work together to patch the remote code execution “PHP2Shell” vulnerability immediately. But the work isn’t done until patch and vulnerability management are streamlined and modernized to prepare for the next AI-amplified attack.

October 22, 2026

“PHP2Shell” vulnerabilities put public-facing websites and CMS platforms at risk

On October 21, 2026, two major vulnerabilities in the PHP web server ecosystem came to light: CVE-2026-109618 and CVE-2026-109619, now known collectively as “PHP2Shell.” The vulnerabilities allow unauthenticated remote code execution. This could allow an attacker to gain elevated privileges to the PHP environment, take over server operations, and/or read credentials, tokens, certificates or other secrets from memory.

PHP still powers a huge number of public-facing websites, including popular content management systems (CMSs) such as WordPress and Drupal, so the potential impact is widespread. Even though subsequent research claims that exploits may require specific server conditions, which would make mass exploitation less likely, IT organizations must treat this as a critical vulnerability with broad impact.

The U.S. National Security Agency (NSA) advised government institutions to patch their systems immediately or, failing that, to shut them down entirely. Consequently, government websites in the U.S. and the EU were shut down, with orders not to return to service until patched. The U.S. Cybersecurity and Infrastructure Security Agency (CISA) concurs that the vulnerabilities require immediate patching, even though there are not yet any publicly known exploits.

Note: This is our first take on the PHP2Shell vulnerabilities.

Join Gartner analysts for a webinar discussion and Q&A on the implications of Black October on cybersecurity

Learn how leading organizations are improving cyber hygiene, transforming exposure management and improving resilience across both IT and operational environments.

By clicking the "Continue" button, you are agreeing to the Gartner Terms of Use and Privacy Policy.

Contact Information

All fields are required.

Company/Organization Information

All fields are required.

Optional

Exposure management must evolve for an AI-accelerated threat environment

AI-powered vulnerability discovery shortens the window between exposure and exploitation. Organizations that rely on slow, volume-driven vulnerability processes risk falling behind an attacker cadence that now scales exceptionally fast in both volume and opportunity. And generally, organizations have failed to invest in the foundations of IT observability, automation and asset management.

Lack of visibility and manual patching place IT on the back foot

In many IT organizations, remediation efforts will be hindered by lack of observability and automation. Administrators will struggle to find all their PHP runtimes, PHP-FPM pools, containers and hosting environments. They may be forced to deploy patches manually. They may lack cooperation from the web developers and application owners who need to test patched environments. These experiences demonstrate the need for an exposure management process that expands across I&O, security and software engineering.

This is not the first or last large-scale vulnerability, so build your defenses against the next one. In recent years, IT organizations have dealt with high-profile major vulnerabilities, including Heartbleed and Log4Shell. But vulnerabilities are being discovered and analyzed faster than ever as frontier AI models reduce the time and expertise required to identify, validate and potentially weaponize complex software flaws. There were more than 48,000 common vulnerabilities and exposures (CVEs) published in 2025, and if the present trend holds, there will be more than 70,000 in 2026.

What to do right now

IT organizations must immediately take the following steps to mitigate the risk posed by the “PHP2Shell” vulnerabilities:

  1. Identify all vulnerable PHP instances in the environment. This is easily done with monitoring/observability tools, but many IT organizations have underinvested in such tooling. In the absence of monitoring tools, use data from configuration automation tools:
    • Agent-based tools like Puppet or Chef maintain databases of installed software on the endpoints they manage; agentless tools like Ansible can still run “fact-check” jobs to query endpoints directly. In a pinch, the latter could even be done with a shell script.
    • Alternatively, security teams may have runtime or internal attack surface discovery tools that would detect vulnerabilities.
    • Discovery and remediation must include infrastructure components, IoT/OT gateways and data concentration units that may use PHP for a local management interface and web dashboards.
    • Be sure to identify the actual PHP runtime version, rather than relying on the application or CMS version.
  2. Build and prioritize an inventory list. Identify the owner responsible for each affected asset, including infrastructure, application and business stakeholders. Prioritize the list if you have more affected PHP installations than you can reasonably address right away:
    • Designate an accountable person or team to coordinate remediation activities across teams.
    • Escalate exposures with unclear ownership, as accountability gaps frequently delay remediation during high-priority vulnerability events.
    • Ideally, you would already have this information in a configuration management database (CMDB) or similar tool, but if not, you’ll need to build the list manually.
    • Focus first on the systems with the greatest exposure, including internet-facing services, critical business applications and assets supporting sensitive data or key operational processes.
  3. Neutralize the immediate threat of vulnerable installations. The NSA’s guidance is sound: It’s best to temporarily remove vulnerable web servers from service until they can be remediated. While removal may bring down customer-facing websites or otherwise impact the business, there are no effective compensating controls for these vulnerabilities. Exposing vulnerable servers to the internet risks leaking credentials or other sensitive data, which would be even worse for the business than some downtime.
  4. Obtain and install patches:
    • The PHP Foundation has released patches for versions 8.2 and newer but does not provide patches for older versions. If you’re running a supported version of PHP, you can download the patches from the Foundation directly.
    • Given the severity of the vulnerability, the Foundation has decided to release “minimal source-backports” for patches for PHP versions going back to 7.4 (released in 2019). If you’re running an older PHP version, check with your CMS vendor or long-term support provider to see if they have a backported patch for you. If possible, use this opportunity to update to a supported PHP version.
    • For versions that cannot be taken offline or patched, implement virtual patching using a web application firewall (WAF) or mitigate using network segmentation.
  5. Assume system compromise:
    • Investigate signs of exploitation, particularly email sending, cryptomining, SEO content, account changes and recently modified files.
    • Restore the system to a known-good state, either from backups or by reinstalling. Use a secure, isolated recovery environment to ensure the new environment is not compromised.
    • Rotate secrets: Change all passwords, rotate all certificates and/or generate new API keys. Secrets managers make this easier, but do it manually if need be. Invalidate existing sessions, especially when suspicious activity is detected.

What to do next

Once the immediate threat has been removed, the IT organization must begin to improve its patch and vulnerability processes to be better prepared for future threats:

  1. Establish a preemptive exposure management mindset. This includes both autonomous cyber defense and autonomous exposure remediation (AER). AER aims to automate all six steps of the continuous threat and exposure management process (CTEM): inventory, discovery, issue validation, planning, testing and remediation.
  2. Map assets and implement bills of materials (BOMs). The asset inventory should bring together multiple operational and security data sources, such as a CMDB, a cloud infrastructure asset inventory and the outputs from management tools. Mandate that each application has a software BOM that lists all its dependencies. Update the BOM regularly — ideally daily but no less than weekly. Correlate asset, exposure and ownership data to establish accountability and prioritization treatment activities.
  3. Modernize architecture and automate testing. A PHP web server that is containerized and running in Kubernetes could have been patched easily, likely without disrupting site hosting. Adopting these technologies now makes it easier to deal with future vulnerabilities. Automate infrastructure and make web servers immutable. Automated testing, especially when done as part of a continuous delivery pipeline, allows developers to deploy rapidly but safely.

Drive stronger performance on your mission-critical priorities.