PHP2Shell is two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619. An attacker can execute code on the server with a single request, without authentication, before your application runs. Every PHP installation that serves web pages is affected. The fix is updating to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35.

Not sure which PHP servers you expose to the internet? Our external prospecting report shows the web services visible from outside. It is free and we run it only with your consent.

Request the free report

What PHP2Shell is

PHP2Shell is the name given to the two vulnerabilities. The first relates to how PHP handles running out of memory. The second, to data left over from an earlier request in the same process. Both lead to the same result: remote code execution, without an account or a password.

The flaws had existed for decades. Wiz researchers say frontier AI models greatly reduced the effort needed to turn an old flaw into a working attack.

How serious it is

The UK National Cyber Security Centre, NCSC, recommends taking offline any system that cannot be updated quickly.

What to do in the first 24 hours

1. Find where PHP runs

Make the full list: the corporate site, the online shop, the customer portal, the intranet, internal applications, appliances with a web interface such as firewalls, NAS devices or routers, and services hosted by providers. Start with everything reachable from the internet.

Check the version used by the web server, from the hosting panel or the package manager. The php -v command may show a different installation from the one serving the site.

2. Update

Linux distributions may fix the package without changing the version number. Check your distribution’s advisory, not just the number shown.

3. Ask your providers for confirmation

If your site is with a hosting provider, ask today for written confirmation that PHP has been updated on your servers. The same for SaaS applications and appliance vendors: follow their advisories and apply updates as soon as they appear.

4. If you cannot update today

Temporary measures reduce the risk, but they do not make an unpatched server safe. Updating remains mandatory.

5. Check whether you were already attacked

Attacks started before the announcement, so check the logs from 17 October onwards:

If you find something, isolate the server, keep the logs and get help from an incident response team before deleting anything.

6. Test from the outside

After updating, check from the internet which web services are still exposed and which versions they report. A forgotten server from an old project is usually the one left unpatched.

If you are a NIS2 entity

Vulnerability handling is a mandatory measure under OUG 155/2024, art. 13 (e). If PHP2Shell leads to a significant incident, the early warning to DNSC is due within 24 hours. Keep the evidence: the server list, the update date, the results of the checks. You will use them in the self-assessment and at the audit. The details are in the NIS2 documentation guide and the one on NIS2 fines.

How TRU helps

Through monthly external PenTest we check your exposed services and vulnerable versions from the internet, and the report shows what to remediate, in order of priority. Internal PenTest does the same inside the company network, where forgotten servers usually sit. Prices start at €31 per IP per month, and the external prospecting report is free.

Sources

CISA · NCSC · Qualys · Help Net Security · BleepingComputer · Wiz. The situation is evolving: also check your vendor’s or distribution’s advisory.