coa npm hijack shipped malware
Attackers compromised maintainer credentials for the coa command-line argument parser and published malicious versions with Windows-focused password-stealing malware.
Story
coa was a small command-line option parser with a large dependency shadow. On November 4, 2021, attackers used compromised maintainer access to publish multiple malicious versions across active release lines. The packages arrived through the registry as legitimate coa releases.
The delivery path was npm installation. Downstream projects and build tools could pull the poisoned releases indirectly, and the install-time code focused on Windows hosts. It fetched and ran additional malware intended to steal credentials.
The malicious package used a preinstall hook to run compile.js before normal installation finished. That placement mattered: the payload did not wait for an application to import coa or call its parser. Dependency resolution was enough to give the attacker code execution in developer and build environments.
The event overlapped with the rc compromise and showed the same failure mode as earlier npm incidents. A trusted package name, a valid publisher path, and enough dependency gravity put malicious code on machines that never made an explicit decision to trust coa.
Affected Artifacts
- Observed
- 2021-11-04
- Fixed
- Not listed
- Hashes
-
- sha256:cd2adb9c16e3c5373f77c4288ab017be03c3a7f8320a2506e9129a402c0c69d6
- sha256:dc7a59c2d600db8f748f0a722e363527e3332a0fd7ffd7d24342a7de6125e9e0
- md5:9c6664390b305a8aeeec859ab8169095
- The GitHub issue reported the compromised versions were present on npm from 2021-11-04 14:12 CET until 15:24 CET.
Incident Context
- Motive
- Credential Theft
- Attribution
- Group
- Cause
- Compromised Account Credentials
- Transitive
- No
- Actor
- UNC3379
External References
Source record: oss/attacks/coa/meta.yaml