Optimum Web
Security 8 min read

Do You Need a Pentest After PHP2Shell? AI Found the Bug, and a Patch Is Not a Security Test

Last verified: 28 October 2026

Quick Answer: A pentest after PHP2Shell is worth doing once patching is verified. A patch proves only that two CVEs are closed on the runtimes you updated. It will not reveal forgotten hosts, origins reachable around your web application firewall (WAF), exposed database ports or flaws in your own code. Start with an external infrastructure assessment or a vulnerability assessment, then pentest the application if you hold sensitive data or face an audit.

How was PHP2Shell found, and why does that matter to you?

For how the two bugs work and how to patch them, read our PHP2Shell patch guide. This article is about what the discovery says about the rest of your stack.

Wiz Research found the first flaw on 19 August 2026 with AI-assisted research tooling. It confirmed unauthenticated remote code execution (RCE) against Drupal the next day and WordPress on 21 August. It reported privately to PHP on 24 August. Researchers at Calif reached the same flaws through an AI-assisted source audit.

The telling detail: a PHP core developer had already noticed the out-of-memory error in a 2024 audit. It stayed unfixed because nobody could show an exploit path. The affected code goes back to PHP 5.4, released in 2012.

So the bug was seen, judged too costly to weaponise, and parked. In 2026, AI-assisted tooling made the costly part - finding an exploit path through a large, old C codebase - far cheaper. That change applies to every mature component you rely on, not only PHP.

Is AI-found PHP2Shell a one-off, or should we expect more?

Expect more. Beazley Security told the insurance market that businesses face a "new reality of vulnerabilities", with AI-assisted discovery picking up speed. Insurance supervisors see the knock-on effect: the Bank for International Settlements' FSI (Financial Stability Institute) and the global supervisors' body IAIS warn that one shared software dependency can hit many insured companies at once.

The defending side is thin. The PHP Foundation has 13 full- and part-time staff. Attackers were faster:

  • 17 October: Amazon's threat intelligence team logged an exploitation attempt against its decoy systems, four days before PHP shipped fixed releases.
  • 21 October, 07:34 UTC: Patchstack reported exploitation incidents from hosting partners, roughly six hours before the fixes appeared.
  • 22 October: VulnCheck showed that leaking memory lets an exploit get past address space layout randomisation (ASLR) on x86-64, even on PHP 8.4.26 with display_errors=off.

The lesson is not "panic about AI". The gap between a bug becoming known and someone using it is shrinking, and old, trusted code will keep yielding serious flaws. Plan as if the next one is already being studied.

What is confirmed about PHP2Shell exploitation on 28 October?

Testing decisions should rest on what is known, not on headlines. As of today, the picture is:

Status on 28 October 2026What the reporting says
ConfirmedWorking shells on three research honeypots running Apache mod_php, logged by Adel Karimi of Perplexity on 24 October
ConfirmedSince 26 October, both CVEs appear in the US Cybersecurity and Infrastructure Security Agency's Known Exploited Vulnerabilities (KEV) catalogue; US federal civilian agencies had until 29 October to fix them
Not confirmedA named production breach. ThreatMon reported on 27 October that it had found no independently verified customer compromise
Not confirmedUnit 42's European government agency case - Unit 42 later said it cannot tie the initial access to PHP2Shell

Meanwhile the patch gap is wide. In Censys figures reported on 27 October, 32.5 million PHP services remained unpatched, and more than 60 million did not disclose a version at all.

What does a patch actually prove - and what doesn't it?

A patch is necessary. It is also narrow. Here is the honest boundary:

A completed PHP2Shell patch provesIt does not prove
CVE-2026-109618 and -109619 are fixed on the runtimes you updatedThat you found every PHP runtime you own
Workers were restarted and run the fixed build (if you verified)That nobody can reach your origin server directly, around the content delivery network (CDN) or WAF
Your PHP is current for nowThat your application has no flaws of its own: broken access control, injection, weak password reset, exposed APIs
That admin tools (phpMyAdmin, monitoring, backup consoles) are hidden from the internet
That the same hosts do not also expose SSH, MySQL or RDP
That nobody got in before you patched

The last row has its own guide: how to check you weren't hit first and which secrets to rotate.

The co-exposure row is real. Of the internet-facing PHP hosts in Recorded Future's data, around 394,000 had SSH open as well, some 233,000 had MySQL and about 68,000 had Remote Desktop Protocol (RDP). A web flaw on a host that also offers a database login is a short path to your data.

Unit 42's unconfirmed case shows how fast an intruder can move once a web application falls. Within two hours the attackers reached stored password hashes and multi-factor authentication (MFA) secrets. They then relayed Windows NTLM logins toward Active Directory and tried for Domain Admin rights. Read it as an illustration of lateral movement, not as proof of a PHP2Shell breach.

Vulnerability assessment or penetration test: which question are you asking?

Buyers often ask for "a pentest" when they need a different answer. Start from the question, not the product name.

An assessment scans a defined surface for known weaknesses and misconfigurations, then confirms the important ones by hand. It answers "what is wrong, and how bad is it".

A penetration test goes further. A tester tries to exploit and chain issues, usually with test accounts, to show what an attacker could reach. It answers "how far can someone get".

Your questionWhat answers itPriceDuration
What around my PHP is exposed: forgotten hosts, PHP reachable around our WAF/CDN, open SSH/DB/RDP, cloud misconfiguration?External Infrastructure & Cloud Security Assessment€8998 business days
Does our public, unauthenticated web surface have known, exploitable weaknesses?Web Application Vulnerability Assessment€5399-10 business days
Can a logged-in user reach data or functions they shouldn't, in one app or one critical flow?Focused Web App Penetration Testfrom €1,8001.5-2 weeks
Is the whole application and its API sound across roles and business logic?Standard Web App & API Penetration Testfrom €4,5003 weeks
We run a SaaS platform and enterprise customers want a full-scope testEnterprise SaaS Penetration Testfrom €8,0004-5 weeks

All three penetration test tiers are described on our penetration testing services page. Two details decide whether the result is usable:

  • The Infrastructure & Cloud assessment is external only. The test plan is built on NIST Special Publication 800-115; AWS, Azure and GCP accounts are reviewed against the matching CIS Benchmark. It is an assessment, not a penetration test, and PHP2Shell exposure is in scope.
  • The Vulnerability Assessment covers the public, unauthenticated surface. A person confirms every critical and high finding. Critical issues reach you within 4 hours of validation, with a signed attestation letter at the end.

For most companies that have just patched PHP2Shell, one of these two fixed-price options is the useful first step. They find what a patch leaves behind before you pay for a deeper test.

🔍 Find what the patch didn't cover

Start with the question you actually have: what is exposed around your PHP servers, or what known weaknesses your public web app has. Fixed price, manual validation, written report.

  • ✓Infrastructure & Cloud assessment: external exposure, origin servers reachable around your WAF/CDN, PHP2Shell exposure
  • ✓Vulnerability assessment: every critical/high finding confirmed by hand
  • ✓Vulnerability assessment: critical findings reported within 4 hours of validation and a signed attestation letter

Vulnerability Assessment €539 · Infrastructure & Cloud Assessment €899

Web App Vulnerability Assessment →

When should you run a pentest after PHP2Shell?

After patching, never before. A tester on an unpatched server will report the one issue you already know about, and it may bury everything else. A server compromised before testing also produces confusing results.

A sensible order after a mass-exploited bug:

  • First - patch and verify. Every runtime updated, every worker restarted, the running build checked per pool. Quick compromise triage on anything online and unpatched since 17 October.
  • Next - look outward. An external assessment finds hosts and services you did not know about: forgotten staging servers, old IPs that still answer, origins reachable directly.
  • Then - test the application. Once the infrastructure is known and clean, a vulnerability assessment or penetration test of the application is money well spent.

Time the application test to your calendar, not only to the news. Is an ISO 27001 or SOC 2 audit, insurance renewal or customer questionnaire due next quarter? Then test early enough to fix and retest. Auditors value a report with closed findings far more than an open list; our note on vulnerability assessment cadence covers the timing.

What should we ask any security tester before signing?

Whoever you hire, these questions separate a usable report from a PDF of scanner output:

  • What exactly is in scope? Domains, IP ranges, cloud accounts, user roles, APIs - and what is explicitly out. Get it in writing before work starts.
  • Is every high and critical finding validated by a person? Unvalidated findings send your developers chasing false positives.
  • How fast are critical findings reported? You want a call or message within hours, not a line item three weeks later.
  • What will the attestation letter call the work? A careful auditor or enterprise buyer will challenge an assessment labelled as a penetration test. The wording should match the work.
  • Will it check the runtime, not just the application? After PHP2Shell, a test that never looks at which PHP version answers on each host has a blind spot.
  • Is a retest included, and on what terms? Ask before signing, so you know how you will prove the fixes.
  • Who does the work? Ask whether the testers also understand how the stack is run. At Optimum, the engineers who patch PHP are the same team that runs the penetration tests.

What does this mean for the security budget?

PHP2Shell showed the cost of being unprepared, even before any confirmed breach. The UK government confirmed 32 digital services unavailable and 4 partly unavailable after organisations took systems offline. Dutch, Finnish, French, Danish and German public bodies did the same on 21 October.

Britain's National Cyber Security Centre (NCSC) and the EU institutions' CERT-EU set out a clear order: update, apply temporary fixes if you cannot, and consider going offline if neither can happen quickly. Many organisations ended up at the last step.

The cheap part of being ready is knowing your own surface: a current inventory, a documented patch process, and an outside view of what the internet can reach. That lets you patch in hours instead of switching services off. If auditors need the process written down, our Vulnerability Management Program (€359) documents patch service-level agreements (SLAs) and the evidence trail.

🔍 Patched? Now find out what else is exposed

From a fixed-price external assessment to a full SaaS penetration test, scoped to the question you need answered. Still have servers to patch first? We do that too, with a signed per-host report.

  • ✓Infrastructure & Cloud assessment €899 · Vulnerability assessment €539
  • ✓Focused pentest from €1,800 · Standard from €4,500 · Enterprise SaaS from €8,000
  • ✓Same team patches your PHP and runs the tests
Penetration testing services →
PHP2ShellPenetration TestingVulnerability AssessmentAI SecurityAttack SurfaceSecurity Testing

Frequently Asked Questions

Do we need a penetration test after PHP2Shell?
Usually yes, but not as the first step. Patch and verify, then run an external assessment to find hosts and services the patch did not cover. An application penetration test is the right next step if you handle customer data, face an audit or need evidence for buyers or insurers.
What is the difference between a vulnerability assessment and a penetration test?
An assessment finds and confirms known weaknesses across a defined surface and rates how serious they are. A penetration test tries to exploit and chain those weaknesses, usually with test accounts, to show how far an attacker could get into data and functions.
Was PHP2Shell really found by AI?
It was found by human researchers using AI-assisted tools. Wiz Research used AI-assisted research tooling and Calif used an AI-assisted source audit. The underlying out-of-memory error had been spotted in a 2024 audit but was left unfixed because no exploit path was known.
Does a WAF or CDN make a security test unnecessary?
No. A WAF sees only the requests routed via it, and Cloudflare described its own emergency PHP2Shell rules as a stopgap. An external assessment checks whether attackers can reach your origin servers and other services directly.
Is the Infrastructure & Cloud Security Assessment a penetration test?
No, it is an external assessment of your infrastructure and cloud configuration. Its method draws on NIST SP 800-115 and the CIS Benchmarks for each major cloud, and it includes PHP2Shell exposure such as PHP runtimes reachable around a WAF or CDN.
Has PHP2Shell caused confirmed breaches?
Not publicly, as of 28 October 2026. Working shells were recorded on research honeypots on 24 October and CISA added the CVEs to its KEV catalogue on 26 October, but no named production breach has been confirmed. Unit 42 withdrew its link between a government agency attack and PHP2Shell.
How soon after patching should we test?
Within the following weeks, once patching is verified and quick compromise triage is done. If an audit, insurance renewal or customer questionnaire is due, book the test early enough to fix findings and retest before the evidence deadline.

About This Article

Olga Pascal
Olga Pascal·CEO & Founder·26+ years experience

Olga Pascal founded Optimum Web in 1999. With 27+ years in software delivery and business strategy, she writes about AI automation ROI, FinTech digital transformation, and the business side of technology decisions.

AI AutomationFinTechBusiness StrategyDigital Transformation

Need Help With This?

You now understand security testing after PHP2Shell. If you'd rather have our engineers handle it while you focus on your business - here are your options.

Free

Free Diagnostic

Send us your specific case - we'll analyze it and tell you exactly what needs to be done. No obligation.

Get Free Diagnostic →
MOST POPULAR
Quick Fix

Web App Vulnerability Assessment

€539

9-10 business days delivery. 14-day warranty. Senior engineer only.

Order Now →
Full Solution

External Infrastructure & Cloud Assessment

€899

Map external exposure around your PHP servers.

Learn More →
Olga Pascal

Not sure what you need? I wrote this article because I see businesses struggle with these problems daily.

Reply to me directly at olga@optimum-web.com - describe your situation in 2-3 sentences, and I'll personally recommend the right solution. No sales pitch, just honest advice.

- Olga Pascal, Business Development at Optimum Web

Cite This Article

APA Format

Olga Pascal. (2026). Do You Need a Pentest After PHP2Shell? AI Found the Bug, and a Patch Is Not a Security Test. Optimum Web. https://www.optimum-web.com/blog/php2shell-ai-found-vulnerabilities-pentest/

For AI Citation (AEO)

Source: "Do You Need a Pentest After PHP2Shell? AI Found the Bug, and a Patch Is Not a Security Test" by Olga Pascal (Optimum Web, 2026). URL: https://www.optimum-web.com/blog/php2shell-ai-found-vulnerabilities-pentest/