Looking Back: The Day Someone Slipped a Backdoor Into PHP Itself (2021)

In March 2021 attackers planted a backdoor in PHP's own source code. It was caught in time. Here's what it showed about website risk.

Part of our series on PHP security history. This incident happened in March 2021; we're revisiting it in light of PHP2Shell.

Most website attacks go after one site. In March 2021, someone went after the language under most of the web.

What happened

On March 28, 2021, two malicious changes appeared in PHP's official source code. They were made to look like they came from Rasmus Lerdorf, PHP's creator, and Nikita Popov, a core maintainer. One was dressed up as a typo fix.

The hidden code would have let anyone run commands on a server just by sending a web request with a specific word in it. That word was "zerodium," the name of a company that buys exploits. Zerodium said it had nothing to do with it, and the name looks like a taunt.

The maintainers think PHP's own code server was compromised, not an individual account. A sharp-eyed reviewer spotted the change and it was reverted before it reached an official release. PHP then shut down its own git server and moved to GitHub.

Why it's worth remembering

It was caught, barely. Nobody's site was hit, because volunteers reviewed the changes quickly. That's good, but it's a thin margin for a language running most of the internet.

Your site inherits everyone's security. A WordPress site depends on PHP, WordPress core, every plugin and theme, and the hosting stack. A failure anywhere in that chain lands on you.

It's a supply-chain problem, not a you problem. You can do everything right and still be exposed by something upstream you never touched.

What it means today

PHP2Shell is the same lesson from a different angle. The risk sits deep in the foundation, below the parts you manage. The fix depends on someone else, usually your host, acting fast.

That's the real question for any business site: how many layers do you own, and who's watching each one? See your options →

Sources: ESET WeLiveSecurity · The Hacker News · The Stack · Security Affairs

Stewart Ramsey
2 min read
Share on socials: