Two critical PHP flaws let attackers run code on web servers; fixed versions are out and AI helped find them
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix the “PHP2Shell” bugs. Amazon saw an exploitation attempt four days before disclosure, and researchers say AI models helped find and test the flaws.
Illustration · not a photoIn short
Two critical flaws in PHP, tracked as CVE-2026-109618 and CVE-2026-109619 and nicknamed “PHP2Shell”, can let an attacker run code on a web server without logging in. The PHP project released fixed versions on 21 October 2026, and security firms report the flaws are being exploited. Researchers who found them say they used AI models in their work.
What happened
The PHP project released emergency security updates on 21 October 2026 for two flaws that can let an attacker take over a web server running PHP with a single request, before any website code runs.12 PHP powers a large share of websites, so the fixes matter to almost anyone who runs a site or app on it.
The two bugs are:2
- CVE-2026-109618: a flaw in how PHP handles running out of memory. If memory runs out while request data is only partly set up, the clean-up step treats that data as valid.
- CVE-2026-109619: leftover state from one request points to freed memory, which a later request on the same worker can use. PHP’s advisory also lists memory disclosure as an impact.
Both are rated 9.2 out of 10 on the CVSS v4.0 scale by the PHP security team. Identifiers that circulated before release carried an incorrect score of 10.0.2
Which versions are affected and fixed
| Branch | Fixed version | |---|---| | PHP 8.5 | 8.5.12 | | PHP 8.4 | 8.4.27 | | PHP 8.3 | 8.3.36 | | PHP 8.2 | 8.2.35 |
PHP 7.4 to 8.1 get only minimal source backports, and PHP 5.4 to 7.3 are past end of life with no fix from the PHP project.12 Help Net Security says every PHP setup that serves web requests is affected, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed.1
Exploitation has started
Amazon Threat Intelligence recorded an exploitation attempt against its honeypots on 17 October, four days before public disclosure; how the attacker got the details is unknown.12 Amazon says the flaws are now being broadly exploited, and Cloudflare reports early attacks.2 The UK’s NCSC urges taking offline any system that cannot be fixed right away.1
AI’s part in the discovery
The PHP Foundation credited Calif, OpenAI and Wiz, among others, for research and responsible disclosure. Calif and Wiz both said they used AI models in their research.2 Help Net Security notes that frontier AI models substantially lowered the barrier to turning the flaws into an exploit.1 This is a clear example of AI cutting both ways: it can help defenders find bugs faster, and it can help attackers use them faster.
What to do now
- Update PHP to a fixed version. PHP says updating is the only complete fix.2
- If you cannot update yet, Tenable lists interim settings: set `memory_limit=-1` so applications cannot override it, and set `session.upload_progress.enabled=0` (plus `fatal_error_backtraces=0` on PHP 8.5), then restart every PHP worker.2
- On shared hosting, check your host’s PHP version in its control panel and ask support if it is not patched.
- Investigate from 17 October, not the disclosure date, as Amazon recommends.2
What it means
For small businesses and bloggers in India and elsewhere, most PHP sites run on shared hosting or managed WordPress, where the host updates PHP. The practical step is to confirm that has happened, not assume it. Developers running their own servers should treat this as an emergency patch. The longer lesson is that the time between a bug being found and being used is shrinking, partly because of AI. Teams that can patch within a day will be better protected than those that patch monthly.
What to watch
- Host and Linux distribution advisories confirming patched packages.
- Whether working public exploit code is confirmed; Tenable had not verified any when it published.2
Related: a hacker’s use of AI agents against 100+ websites and Microsoft’s new controls for AI agents.
Keep reading on this topic
Safety & TrustCohere signs a letter of intent to buy AISLE, the AI security start-up whose scanners found 18 of 24 flaws in curl’s latest releaseSafety & TrustResearcher says one hacker used AI agents to break into more than 100 company websites for about $5,000Safety & TrustMeta says attackers used an employee’s stolen login to copy code from some of its GitHub repositoriesSafety & TrustAnthropic says new defences cut data harvested by distillers from Claude by around 90 to 99 percent More in Safety & Trust →How this story was checked
- ResearchedWith AI assistance · 2 sources
- AI source checkEach sentence matched to its source
- Editor approvalMayank Sahu · 22 Oct, 16:37
- Published22 Oct, 16:37
Verify this story
- 2 sources, 0 official · 2 with an archived copy · see sources
- Every fact has a label and a source number · fact ledger
- What we searched, read and could not verify · research note
- Machine-readable: facts as JSON · text as Markdown
How this was made: researched, drafted and source-checked by AI (Claude, made by Anthropic), then published under the editor’s standing approval. A person did not read it line by line before it went live. AI policy
Fact ledger
How labels workTracked from this story
All trackersPHP project (open source), PHP 5.4 to 8.5 · started not known · duration not published
All incidentsQuestions readers ask
Which PHP versions fix PHP2Shell?
PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Older branches get only source backports or no fix.
Is PHP2Shell being exploited?
Yes. Amazon recorded an attempt on 17 October and says the flaws are now broadly exploited; Cloudflare reports early attacks.
What if I cannot update PHP right away?
Tenable lists interim settings, including memory_limit=-1 and session.upload_progress.enabled=0, followed by restarting PHP workers. Updating is the only complete fix.