PHP2Shell: Who Protects Users When AI Finds the Flaw First?

Author

TECHVIFY Team
The TECHVIFY Team is a group of experienced professionals passionate about technology and innovation.
In October 2026, PHP fixed two critical flaws that researchers had found with the help of AI weeks earlier, before any attacker was known to be involved. It was a clear win for AI on the defensive side, and it left a harder question open: once AI finds the flaw, who actually keeps users safe?
In PHP2Shell, and in AI security more broadly, the answer is a group of people with different jobs. This article looks at who they are, how they test what they build, and what the PHP2Shell case shows about the part people still play.
AI that protects users takes five roles
Safe AI is rarely the work of one team. In Techvify's view, five roles share it, and each one covers ground the others cannot:
- Business or product owner: decides what the AI may and may not do.
- Legal and compliance: makes sure the system meets applicable laws, and can prove it.
- Responsible AI specialist: turns values into principles and assesses the harms the law misses.
- Data scientist or researcher: measures and reduces bias and quality risk, with evidence.
- AI or ML engineer: turns policies into working technical controls inside the system.
Put simply, the business sets the scope, legal and ethics set the limits, data scientists measure the risk, and engineers build it into the system. AI has no conscience of its own, so the responsibility starts with the people who build it.
A red team finds weak spots before attackers do
Building defenses is one half of the job, and testing them the way an attacker would is the other. AI engineers defend from the inside, knowing how the system is meant to work. A red team attacks from the outside, testing the defenses the way an outsider would, so weak spots surface before launch.
The difference shows in how a team handles risk:
| Without a red team | With a red team |
|---|---|
| Weaknesses are found by attackers, after harm | Weaknesses are found in a controlled setting, before launch |
| Teams assume guardrails work | Teams have evidence of how guardrails fail |
| Risk is discussed in theory | Risk is shown with concrete examples that are hard to dismiss |
| Fixes are guesses | Fixes are prioritized by real exploitability and impact |
Red teams do not have to start from a blank page. Shared misuse review checklists such as the OWASP Top 10 for LLM Applications, MITRE ATLAS and the NIST AI Risk Management Framework give them a common starting point.
PHP2Shell: when defenders found the flaws first
PHP2Shell is the name given to two flaws in PHP, CVE-2026-109618 and CVE-2026-109619, both rated 9.2 on CVSS v4.0. Either one lets an attacker run code on a web server without logging in. They affect every PHP installation that serves web requests, with Apache mod_php at the highest risk.
The flaws were found and reported by Wiz Research, Calif and OpenAI's Codex Security team, who used AI models to confirm that the bugs could become working exploits. TrendAI researchers describe it as a discovery by defensive researchers, made through an AI-assisted audit before attackers found the bugs. From there, events moved quickly:
- Before disclosure: the researchers reported the flaws in August with working demonstrations, and the details stayed under embargo for about two months.
- 20 October: details leaked two days ahead of the planned disclosure, and the PHP team moved its emergency release up by a day.
- 21 October, 14:00 UTC: fixed releases shipped as PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
- Same day: exploit attempts were reported within minutes of the release. Cloudflare, which had firewall rules in place since early that morning, saw attackers changing payloads to get around them.
- 24 to 26 October: researchers confirmed successful exploitation, and CISA added both flaws to its Known Exploited Vulnerabilities catalog with a three-day deadline for federal agencies.
For organizations running PHP, three defenses mattered most in those first days:
- Immediate patching: fixed releases applied as soon as they shipped.
- Stopgap mitigations: for teams that could not update at once, the PHP team published interim measures, including disabling PHP's memory limit in a way applications cannot override and setting a lower cap on request body size.
- Detection rules: security vendors quickly released rules that flag the attack pattern, such as Suricata signatures.
These measures helped reduce risk, although some sources noted that the early workarounds were not a complete fix.
Authorities advised organizations that could not patch at once to take affected systems offline. The fix was ready within days of the leak; the exposure lasted as long as each organization took to apply it.
One vulnerability, many hands
In the case of PHP, keeping end users safe has been a shared responsibility. Each party covered a different stretch of the path from discovery to a patched server:
| Party | Core responsibility | What they did |
|---|---|---|
| Researchers (Calif, Wiz, OpenAI) | Find the flaws and report them privately | Reported in August with working demonstrations, and kept the details embargoed for about two months |
| PHP project and Foundation | Fix the code, coordinate the release, warn users | Built the fix, gave distributors early access, and moved the release up a day after the leak |
| Distributors and vendors | Turn the fix into packages users can install | Linux distributions, control-panel vendors and appliance makers shipped fixed builds |
| Hosting providers | Patch servers they run for customers | Rolled out patches and firewall rules |
| Edge and security vendors | Block attacks while patches spread | Cloudflare and Wordfence filtered exploit traffic |
| Governments | Raise awareness and set priorities | CISA listed the flaws, and the NSA, UK NCSC and CERT-EU issued guidance |
| Site owners and businesses | Apply the patch or upgrade | Updated, or moved off old PHP |
The AI capability was only half the work
AI found the PHP2Shell flaws, and people did the other half. They directed the AI, validated its findings, coordinated with the maintainers and managed the timing of the disclosure. None of those steps happened on their own.
The same holds for any business running PHP, or any other software. Protection from researchers, maintainers and security vendors only goes so far, because users can act only after a flaw is fixed. A few steps make that moment count:
- Enable automatic updates for operating systems and software.
- Make a simple inventory: each system or service, what it is for, who owns it, what sensitive data it can reach, whether MFA is required, and what you lose if you lose it.
- Replace or isolate unsupported systems: if anything runs a version its maker no longer supports, plan to replace it or cut it off.
- Ask your suppliers and hosts how they handle security.
AI that protects users comes from AI engineers and security teams working together, and the last step of that protection still sits with the organizations running the software.
If PHP2Shell left your team asking what it actually runs, and who would move first when the next flaw goes public, those are questions worth settling before that day comes. Our engineers can help you work through them in a security consultation.
Sources
- Calif Research. (2026, October). php2shell: A tale of two PHP remote vulnerabilities.
- The PHP Foundation. (2026, October 21). Today's PHP security release, and how we're strengthening PHP security.
- Cybersecurity and Infrastructure Security Agency. (2026, October 26). CISA adds two known exploited vulnerabilities to catalog.
- Matsukawa, B., & Chen, J. C. (2026, October 27). Not only ARTEX: The different levels AI is used in attacks targeting Japan. TrendAI.
- Gatlan, S. (2026, October). PHP ships emergency patches for critical PHP2Shell flaws. BleepingComputer.
- The Hacker News. (2026, October). PHP issues emergency patches for two critical PHP2Shell RCE flaws as exploit attempts emerge.
- Abstract Security. (2026). PHP2Shell: Critical PHP RCE vulnerabilities CVE-2026-109618 and CVE-2026-109619.
- Abraham, M., Norton, K., & Kuzma, B. (2026, October 27). PHP2Shell: When the patch is ready, but the organization isn't. IDC.
- Genkina, D. (2026, November 2). The PHP2Shell vulnerability heralds cybersecurity hell. IEEE Spectrum.
- Pollock, G. (2026, November 5). Ready or not: What we learned from watching 10,000+ companies patch PHP2Shell. UpGuard.