OpenAI Ships a Codex Skill to Check PHP2Shell RCE
OpenAI has shipped a Codex skill — packaged as the open source php2shell-checker repository on GitHub — to help website operators figure out whether their PHP installations are affected by the pair of critical remote code execution vulnerabilities now tracked as PHP2Shell. The skill is a version checker, not a full vulnerability scanner, and OpenAI is explicit about the distinction: a version check tells you whether your PHP release is in the affected range, but it is not proof that a security fix is installed. The flaws themselves, CVE-2026-109618 and CVE-2026-109619, were disclosed on October 21, 2026, with emergency patches released the same day, and CISA added both to its Known Exploited Vulnerabilities catalog on October 26 after confirming active exploitation in the wild.
The backstory is what makes this release unusual. The vulnerabilities were found with the help of OpenAI’s models — OpenAI says its “Calif” agent identified a critical flaw using GPT-5.6 Sol as part of its Patch the Planet initiative, while security firm Wiz independently discovered and reported both issues. That means the same company whose models helped find the bug is now shipping a tool to check whether your server has it. It is a full-service loop, and it also previews how AI-assisted security disclosure is starting to work at internet scale.
The PHP2Shell vulnerabilities, in plain terms
The two flaws live in PHP itself, not in any application running on top of it. That is the alarming part: a vulnerable PHP installation exposes every site on that server regardless of whether the site’s own code is secure.
CVE-2026-109618 is an out-of-memory handling vulnerability — specifically an upload-progress unserializer use-after-free — that can enable unauthenticated remote code execution and remote disclosure of PHP worker process memory. CVE-2026-109619 is a fatal-error backtrace use-after-free with the same class of impact. Wiz combined the two into a single exploit script called php2shell and demonstrated unauthenticated code execution against stock deployments of WordPress, Drupal, and Joomla.
Both carry a CVSS v4.0 score of 9.2 out of 10. The affected surface is broad: every PHP installation that serves web requests is at risk, including PHP-FPM, Apache with mod_php (which PHP itself flags as the highest-risk configuration), php-cgi, FrankenPHP, and LiteSpeed. Wiz estimates PHP powers around 70% of websites, and the vulnerability affects essentially every PHP version released over the past decade, going back to PHP 5.4.
The fixed versions are 8.5.12, 8.4.27, 8.3.36, and 8.2.35. Anyone on PHP 7.x or earlier cannot patch in place — those branches are end-of-life and must migrate to a fixed 8.x release.
What the Codex skill actually does
The php2shell-checker skill is designed to identify potentially vulnerable PHP versions. It is intentionally scoped: it checks your PHP version against the affected range and points you toward the right update, but it leaves the “determine which updates apply” step to PHP’s and your hosting provider’s guidance. OpenAI’s disclosure page frames it as a first-pass triage tool for operators who need to answer one question quickly: “am I in the affected range?”
There are three important things to understand about how to use it, and about its limits.
First, it is a Codex skill, which means it runs inside the Codex agent environment rather than as a standalone binary you download and execute blindly. You feed it information about your PHP version — or point it at a system it can inspect — and it compares that version against the known-vulnerable ranges. The GitHub repo contains the logic, so operators who prefer to inspect before running can read exactly what the check does.
Second, a version check is a heuristic, not a proof of security. Backported patches are the classic failure mode here: a Linux distribution may ship PHP 8.2.26 with the PHP2Shell fix backported into it, and a naive version check would flag it as vulnerable when it is not. OpenAI calls this out explicitly, which is why the skill defers to distribution and provider guidance rather than claiming a green light on version alone.
Third, the skill does not exploit, scan for exploitation, or attempt remediation. It is a detection aid for a disclosure that was already urgent. Operators who need deeper confirmation should use the maintainers’ official patches and CISA’s remediation guidance rather than treating a version check as the end of the process.
The bigger story: AI finds bugs, then ships the fix loop
The PHP2Shell disclosure is a milestone for AI-assisted security because the same lab that found the flaw is now shipping tools to help defenders respond. OpenAI’s Patch the Planet initiative is built around a concept it calls the “Defender’s Window” — the period between when a frontier model finds a vulnerability and when attackers do. OpenAI argues its models found PHP2Shell before attackers did, giving maintainers and security providers time to prepare fixes and protections ahead of public disclosure.
That claim is hard to verify independently, and it deserves skepticism. What is verifiable is the mechanics: OpenAI says it coordinated with PHP’s maintainers, Wiz, Cloudflare, and others to prepare fixes and mitigations before disclosure, and it engaged US government bodies including CISA and the Office of the National Cyber Director, plus international partners, to push guidance toward critical infrastructure. CISA’s own timeline — emergency patches October 21, KEV catalog entry October 26, active-exploitation confirmation October 27 — shows the fast-moving response the disclosure triggered.
The uncomfortable flip side is that the same capability is dual-use. OpenAI’s own write-up acknowledges that the models that find vulnerabilities “can also help attackers rapidly develop offensive tools and exploits.” That is the core tension of AI security: a frontier model is simultaneously the best auditor and, in the wrong hands, the best attacker. OpenAI is trying to tilt the balance with subsidized access — it committed $1 billion in Daybreak access for organizations with limited security resources protecting essential services — but the asymmetry is not going away.
A practical patching checklist for operators
The priority is applying the fix, not running a version check. If you run PHP on any server, do the following now.
- Identify every PHP installation you operate. Check web servers (Apache mod_php, PHP-FPM, php-cgi), container images, and unusual runtimes like FrankenPHP and LiteSpeed. The affected surface is not just “the main site.”
- Verify your PHP version. Run
php -von each host and compare against the fixed set: 8.5.12, 8.4.27, 8.3.36, 8.2.35. If you are below these, you are in the affected range. - Patch immediately, or migrate. Update to a fixed release. If you are on PHP 7.x or earlier, you must migrate to a fixed 8.x branch — there is no in-place patch.
- Treat mod_php as highest risk. PHP itself flags Apache with mod_php as the highest-risk configuration, so those servers go first in your queue.
- Do not trust a version check alone. If you use a distribution-packaged PHP, check your vendor’s advisory to see whether the fix was backported. A version number below the fixed set does not automatically mean unpatched — and a version at the fixed number is what you should be aiming for regardless.
- Look for signs of prior exploitation. CISA has confirmed active exploitation, so patching alone may not be enough. Check logs for unexpected behavior and consider forensic triage on systems that were exposed before October 21.
Who should use the Codex skill, and who should not
Use it if you are an operator or small-team developer who needs a fast answer to “is my PHP version in the affected range?” and you already understand that the answer is a starting point. The skill is genuinely useful as a triage shortcut for people who maintain their own servers and would otherwise have to cross-reference version tables by hand.
Do not use it as your only source of truth if you run production infrastructure at scale. Large fleets need distribution advisories, CISA’s Known Exploited Vulnerabilities guidance, and a proper patch-management workflow, not a single agent-based version check. And do not use any version checker — this one included — as a substitute for applying the patch. The check reduces the time to triage; it does not reduce your exposure.
Limitations and caveats
The version-check limitation is the most important one and bears repeating: the skill identifies potentially affected versions, not confirmed vulnerabilities, and OpenAI states that a version-check result is not proof that a fix is installed. Backported patches, custom PHP builds, and version strings manipulated by hosting providers all complicate a pure version comparison.
There is also a legitimate question about how much the “AI found it first” framing matters in practice. The Defender’s Window is only valuable if it actually produces earlier fixes, and while the coordination described by OpenAI and CISA’s rapid response suggest it did in this case, the long-term question is whether that advantage holds as model access widens. If the capability to find PHP2Shell-class bugs becomes cheap and broadly available, the window shrinks for everyone.
Finally, the skill is new and its exact behavior depends on the Codex environment it runs in. Operators should read the php2shell-checker repository source before running it against production, which is good hygiene for any security tool that arrives in the middle of an active-exploitation disclosure.
How this compares to other detection options
The Codex skill is one of several ways to triage your PHP2Shell exposure, and it is worth knowing what each does differently. A plain version check — php -v plus a manual comparison against the fixed set — is the most transparent but also the most error-prone, because backported patches and custom builds hide the true state. Vendor security advisories from your distribution or hosting provider are the most authoritative, since they account for backports, but they arrive on the vendor’s schedule and may not cover a server you patched outside the normal flow. Commercial vulnerability scanners from Wiz, Qualys, or Tenable give you fleet-wide coverage and exploitability context, but they are heavier to run and often require agent deployment. The Codex skill sits in between: it is lightweight, open source, and runs in an agent context where you can ask follow-up questions about what the result means — but it is only as good as the version data you feed it, and OpenAI is explicit that it is not a substitute for applying the fix. For a single server triage, the skill is a fine first step; for a production fleet, pair it with your scanner and your vendor advisories.
What this means for the next year of AI and security
PHP2Shell is not the last of these. OpenAI’s disclosure page is explicit that it has found several significant vulnerabilities already and expects similar findings to “increase sharply” in the coming months. That projection, from the company running the models, is worth taking seriously whether or not you trust its framing.
The practical consequence for anyone who operates infrastructure is that AI-assisted vulnerability discovery is now a real input into the security lifecycle, not a research demo. The same models that write your code are finding critical flaws in the languages that code runs on, and the tooling to respond — Codex skills, version checkers, coordinated disclosure frameworks — is shipping alongside. Operators who treat patching as a quarterly chore are going to find the gap between discovery and exploitation shrinking faster than their patch cadence can keep up with. Running the php2shell-checker skill is a five-minute way to find out whether your PHP servers are on the wrong side of that gap.
Sources
- OpenAI — Patch the Planet: global response coordination as agents uncover critical vulnerabilities
- Wiz — PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet
- CISA — Critical Vulnerabilities in PHP Require Immediate Patching
- BleepingComputer — PHP ships emergency patches for critical PHP2Shell flaws
- BleepingComputer — CISA confirms PHP2Shell vulnerabilities now exploited in attacks
- php2shell-checker (GitHub)