Skip to content
Patching PHP2Shell Was the Easy Part, But its Just the Start for Defenders

Patching PHP2Shell Was the Easy Part, But its Just the Start for Defenders

Infosecurity-Magazine • November 20, 2026

When PHP shipped fixes for the two PHP2Shell vulnerabilities on October 21, plenty of incident tickets were closed within the week. I think a lot of those tickets were closed too early, and the public reporting on what attackers went after in October shows why.

Most incident playbooks treat the patch as the finish line. It belongs near the start. A patch keeps the attacker out but does nothing the passwords, tokens and keys that left while the hole was open, and on the evidence of the past month, those were what attackers wanted most.

Documented PHPsShell Activity

Start with the bug. Wiz , which found PHP2Shell with Calif, showed that one variant could read memory from a PHP worker and hand it back to the attacker inside a PHPSESSID cookie. That memory can hold passwords, authentication tokens, API keys and certificates from other users' requests. No code execution is needed, so there is no webshell to find. If a server was exposed and still unpatched once exploitation began, nobody can prove that nothing was read.

The most serious intrusion documented so far points the same way. Researchers at Dream found an operator chaining PHP2Shell with a Linux kernel bug to get root access on Palo Alto Networks firewalls, which run PHP on their management web server. Palo Alto's Unit 42 attributes the activity to a Chinese-speaking attacker.

Inside one US government-affiliated network, the attacker reached the firewall management server, decrypted the LDAP service account password stored in its configuration, enumerated Active Directory and sprayed passwords at every user account. The firewall was only the way in. The attacker spent their effort on the directory.

On the same day PHP released its fix, a malicious LiteLLM 1.107.0 release went out on PyPI and Docker Hub. According to the maintainers and Microsoft's analysis, it ran every time Python started and collected browser passwords and cookies, SSH keys, AWS, Azure and Google Cloud credentials, Git and package registry tokens, and configuration for AI coding tools. That is close to what a commodity infostealer takes from a PC, the raw material of stealer logs. This time it ran on build servers and developer laptops, where logins lead to production.

Its report also records a key replaced mid-incident being captured by the scheduled backup, which the attacker could read, and used a few hours later. In Denmark, someone used a small company's legitimate access to the CPR register to pull data on 8.8 million people. An anonymous hacker told the newspaper Politiken they logged in with a former employee's leaked password. The claim is unconfirmed, but it would surprise nobody in this industry.

Stolen Credentials Usually Used Later On

Stolen credentials rarely get used the day they are taken. Memory dumps and stealer output are bulk data. Someone has to parse them, sort the logins by domain and value, then use or sell the good ones. A VPN login for a mid-sized manufacturer can sit in a log bundle for weeks before a broker gets to it, and then change hands again. By the time someone tries it against your Microsoft 365 tenant, the incident that leaked it has been closed for a month and nobody connects the two.

Session cookies make this worse. Resetting a password does not invalidate a cookie issued after the user passed MFA. Whoever holds that cookie is already signed in. Revoking sessions and refresh tokens is the step that actually locks them out, and in my experience it is the step most often skipped.

The fair objection is cost. Rotating every secret on every exposed host is slow and breaks things: hard-coded service passwords, undocumented integrations, batch jobs that fail overnight. Forced sign-outs fill the helpdesk queue. All true. You do not need to rotate everything in the company, only what was reachable from exposed machines, in order of how much damage each credential could do.

A rotation that breaks a job has just shown you a dependency you needed to know . And Zeabur's experience shows that a hurried rotation, done without checking where the new secret ends up, can hand the attacker the replacement.

For the two weeks after a mass-exploitation event, this is the order I would work in:

Days one and two: patch or take offline every exposed system, including PHP inside vendor appliances, and record which hosts were exposed unpatched, and for how long.

Days one to three: for those hosts, list every credential they held or could reach, including service accounts, cloud roles, API keys, database passwords, CI tokens and the browser sessions of anyone who used them.

Days two to five: rotate in order of blast radius, starting with directory and cloud admin credentials. Rotate at the issuing service, and check where the new value gets stored, backups included.

Days two to five: revoke sessions and refresh tokens for affected users and service principals.

First week: reconcile accounts against leavers and contractor end dates, and disable anything that should not exist.

Second week: hunt for use of the old credentials, such as unusual sign-in locations, cloud API calls from outside your ranges and password spraying.

Afterwards: keep monitoring for three to six months, watch for your domains' logins in breach dumps and stealer logs, and trace every hit back to its source.

Patch rates are easy to measure, which is probably why they became the finish line. "Patched" should mean the hole is closed. An incident should only be closed when the credentials that went through it no longer work.