This report documents a significant NPM supply chain attack that compromised 18 popular packages, including debug
and chalk
, through a phishing attack on a maintainer’s account. The attack resulted in malicious code being injected into legitimate packages, targeting crypto/web3 wallet activity.
The point of failure was the compromise of a maintainer’s NPM account through a phishing email:
npmjs.help
) impersonating NPM supportindex.js
that executed in client browsersAccording to the Aikido blog report, the following 18 packages were compromised:
Package | Compromised Version |
---|---|
backslash | 0.2.1 |
chalk-template | 1.1.1 |
supports-hyperlinks | 4.1.1 |
has-ansi | 6.0.1 |
simple-swizzle | 0.2.3 |
color-string | 2.1.1 |
error-ex | 1.3.3 |
color-name | 2.0.1 |
is-arrayish | 0.3.3 |
slice-ansi | 7.1.1 |
color-convert | 3.1.1 |
wrap-ansi | 9.0.1 |
ansi-regex | 6.2.1 |
supports-color | 10.2.1 |
strip-ansi | 7.1.1 |
chalk | 5.6.1 |
debug | 4.4.2 |
ansi-styles | 6.2.2 |
Status: NOT COMPROMISED by the supply chain attack
Audit Summary:
Current Vulnerabilities:
nth-check
<2.0.1 (high) - Inefficient Regular Expression Complexitypostcss
<8.4.31 (moderate) - PostCSS line return parsing errorwebpack-dev-server
<=5.2.0 (moderate) - Source code theft vulnerabilitiesStatus: CLEAN - No vulnerabilities found
Audit Summary:
Status: SAFE - No compromised packages found in sub-dependencies
Frontend Sub-dependency Check:
debug
found: 4.4.1 (SAFE - not the compromised 4.4.2)chalk
found: 4.1.2 (SAFE - not the compromised 5.6.1)ansi-styles
found: 4.3.0, 5.2.0, 6.2.1 (SAFE - not the compromised 6.2.2)color-convert
found: 1.9.3, 2.0.1 (SAFE - not the compromised 3.1.1)color-name
found: 1.1.3, 1.1.4 (SAFE - not the compromised 2.0.1)supports-color
found: 5.5.0, 7.2.0, 8.1.1 (SAFE - not the compromised 10.2.1)strip-ansi
found: 6.0.1, 7.1.0 (SAFE - not the compromised 7.1.1)ansi-regex
found: 5.0.1, 6.1.0, 6.2.0 (SAFE - not the compromised 6.2.1)wrap-ansi
found: 7.0.0, 8.1.0, 9.0.0 (SAFE - not the compromised 9.0.1)error-ex
found: 1.3.2 (SAFE - not the compromised 1.3.3)is-arrayish
found: 0.2.1 (SAFE - not the compromised 0.3.3)slice-ansi
found: 5.0.0, 7.1.0 (SAFE - not the compromised 7.1.1)supports-hyperlinks
found: 2.3.0 (SAFE - not the compromised 4.1.1)Backend Sub-dependency Check:
debug
found: 2.6.9, 4.4.1 (SAFE - not the compromised 4.4.2)chalk
found: 4.1.2 (SAFE - not the compromised 5.6.1)ansi-styles
found: 4.3.0, 5.2.0, 6.2.1 (SAFE - not the compromised 6.2.2)color-convert
found: 2.0.1 (SAFE - not the compromised 3.1.1)color-name
found: 1.1.4 (SAFE - not the compromised 2.0.1)supports-color
found: 5.5.0, 7.2.0, 8.1.1 (SAFE - not the compromised 10.2.1)strip-ansi
found: 6.0.1, 7.1.0 (SAFE - not the compromised 7.1.1)ansi-regex
found: 5.0.1, 6.2.0 (SAFE - not the compromised 6.2.1)wrap-ansi
found: 7.0.0, 8.1.0 (SAFE - not the compromised 9.0.1)error-ex
found: 1.3.2 (SAFE - not the compromised 1.3.3)is-arrayish
found: 0.2.1 (SAFE - not the compromised 0.3.3)
package-lock.json
files are committed and used to pin dependencies to exact versionsnpm audit
regularly and address all vulnerabilitiesnpm audit
before each deploymentnpm ls
output for unexpected packagesThis supply chain attack highlights the critical importance of dependency security in software development.
The key takeaway is that security is not just about protecting your own code, but also about carefully managing and monitoring all external dependencies throughout their lifecycle.