Open Source · · 5 days

hautelook/phpass hijacked through GitHub organization

Attackers re-registered the deleted hautelook GitHub organization and recreated its phpass repository. Packagist then served code from the hostile replacement path.

hautelook/phpass failed through namespace reuse. The original GitHub organization was deleted after the project moved, but the Packagist package still pointed at the old repository path. An attacker registered the abandoned organization name and recreated the phpass repository.

Composer and Packagist trusted the coordinate. Installers resolving hautelook/phpass could fetch from the attacker's repository because the URL still matched the package metadata. No source forge was needed; the abandoned namespace became the source.

The malicious replacement carried code that read two hardcoded environment variables, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. Packagist administrators redirected users to a pre-existing clean fork, and Concrete CMS advised moving to PHP's built-in password hashing while Packagist and GitHub removed the hostile repository.

This differs from a typosquat. The package name was established, and the attacker took over the exact upstream location that package metadata still referenced. The failure was stale ownership on an official dependency path.

Notes

  • Complete probable-exact malicious 0.3.x and 0.3.x-dev archives are retained from Backstabber's Knife Collection, plus the Packagist-remediated 0.3.6 source reference.
  • The separately reported bc9cf9f1 whole-file digest remains unavailable after Forager attempts. A bounded carrier fragment from CrowdStrike's archived Figure 2 is also retained; it is related Python ctx code.

Appendix · Affected releases

  • Affected Packagist scope covered hautelook/phpass versions pulled between 2022-05-19 and 2022-05-24.
  • Packagist reported the affected package had not seen many installs recently and was rewired to the maintained bordoni/phpass repository.
  • Public claims of millions of combined users are not treated as confirmed impacted users for this specific Packagist package.
Payloads and stagesno published version

References

  1. Supply chain hack phpass repo jackingconcretecms.org
  2. Supply Chain Attack: CTX Account Takeover and PHPass Hijack Explainedorca.security
  3. Detecting Poisoned Python Packages: CTX and PHPasscrowdstrike.com
  4. PyPI Package 'ctx' and PHP Library 'phpass' Compromised to Steal Environment Variablessonatype.com
  5. PyPI package ctx and PHP library phpass compromisedthehackernews.com
  6. Attackers compromised PyPI package to steal AWS keyscybersecuritynews.com

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