Open Source 2021-03-28 · 0 days ·Backdoor, Remote Code Execution

PHP source received backdoor commits

Attackers pushed two malicious php-src commits through git.php.net HTTPS authentication. The backdoor checked for a User-Agentt: zerodium header and could execute PHP code.

Story

The PHP project still treated git.php.net as canonical. On March 28, 2021, two commits landed in php-src under the names of Rasmus Lerdorf and Nikita Popov. The commits looked like ordinary maintenance. They were not.

The payload touched the PHP interpreter path and used an HTTP header trigger. If a request supplied the misspelled User-Agentt header beginning with zerodium, the injected code evaluated attacker-controlled PHP. A production build from that tree would have turned the runtime itself into a remote execution surface.

The first response treated the event as likely PHP-hosted Git infrastructure compromise. A later update changed the picture. Access logs showed the malicious commits were pushed over HTTPS using password authentication through git-http-backend, outside gitolite's SSH path. The project no longer believed the git.php.net server itself had been compromised, but considered it possible that the old master.php.net user database had leaked.

The response was architectural. PHP made GitHub the primary repository host, made git.php.net and svn.php.net read-only, migrated master.php.net to main.php.net, reset all php.net passwords, moved password storage to bcrypt, and removed the need to keep HTTP Digest-compatible MD5 password material. The backdoor did not become a stable release; its importance is structural. One accepted commit in the language source tree could have put hostile behavior inside every downstream build.

Affected Artifacts

Incident Context

Motive
Espionage Strategic Advantage
Attribution
Person
Cause
Compromised Credentials
Transitive
No
Actor
Individual Hacker

External References

Source record: oss/attacks/php/2021/meta.yaml