Open Source · · 30 days

PEAR installer served Perl backdoor

The official go-pear.phar installer on pear.php.net was replaced for roughly a month, between the last clean release on 2018-12-20 and the discovery on 2019-01-19. The malicious installer enabled a Perl backdoor and exposed systems that built PEAR from the official site.

PEAR was an old distribution root for PHP code, and go-pear.phar was its bootstrap installer. In January 2019, maintainers found that the copy served from pear.php.net had been replaced on the project server.

PEAR's own follow-up placed the taint after the last official file release on 2018-12-20 and said it had no concrete evidence that anyone downloading before that date received an infected file; thePHP.cc independently bounds the window to 2018-12-20 through 2019-01-18. The widely repeated "six months" was PEAR's precautionary advice about who should re-download, not a measured exposure window, and Rapid7 and cPanel both reported it as speculative. PEAR warned that anyone who downloaded go-pear.phar during the prior six months should compare it against the clean GitHub copy. Rapid7 reported that, to PEAR's knowledge at the time, only the copy on pear.php.net was known to be affected.

cPanel described the malicious installer as an extractor that enabled a Perl backdoor and opened a shell to a remote infected server. That gave the attacker a path to install applications, run code, and capture sensitive data. DCSO published a MISP event for defenders under UUID 5c46dd16-2ed0-4604-ab12-181cac12042b.

The project took most of pear.php.net offline while it investigated. Users were told to fetch the same release from pear/pearweb_phars, compare hashes, and treat mismatches as compromise evidence. This was not dependency confusion or a lookalike package; it was the official installer file, served from the official site, replaced in place.

Appendix · Affected releases

  • The preserved clean comparator embeds PEAR 1.10.7 and has MD5 95ef294f47d21d8c27af75a34f055f16.
  • The preserved post-incident release embeds PEAR 1.10.8 and has MD5 7f5a042e127bcb89f7c38131960ba08a.
  • The malicious PHAR with MD5 1e26d9dd3110af79a9595f1a77a82de7 remains unresolved.
Payloads and stagesno published version
unknown sha256 89cd1f67…ed693067 download unavailable

References

  1. Someone Hacked PHP PEAR Site and Replaced the Official Package Managerthehackernews.com
  2. pear.php.net probably compromisedblog.paranoidpenguin.net
  3. PEAR security breach announcementtwitter.com
  4. PHP Extension and Application Repository (PEAR) Compromise: What You Need to Knowrapid7.com
  5. When PHP Went Pear Shaped- The PHP PEAR Compromisecpanel.net
  6. Blast from the Pastthephp.cc

Source record: oss/attacks/pear/meta.yaml