Block/remove these exact versions everywhere (dev, CI, prod, caches):
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
-
Freeze deployments of Node.js apps until remediation is complete.
-
Hunt org-wide for these versions:
npm ls \ "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"
-
Purge caches:
- npm/pnpm/Yarn caches
- Docker build caches
- Private registries (Artifactory, Verdaccio, Nexus, etc.)
-
Rotate secrets on any runner or workstation where malicious versions were installed.
npm install --save-exact debug@4.4.1
npm install --save-exact chalk@5.3.0
npm install --save-exact ansi-styles@6.2.1
npm install --save-exact strip-ansi@7.1.0
npm install --save-exact ansi-regex@6.0.1
npm install --save-exact wrap-ansi@8.1.0
npm install --save-exact color-convert@2.0.1
npm install --save-exact color-string@1.9.1
npm install --save-exact color-name@1.1.4
npm install --save-exact slice-ansi@6.0.0
npm install --save-exact supports-color@9.4.0
npm install --save-exact supports-hyperlinks@4.0.0
npm install --save-exact has-ansi@5.0.1
npm install --save-exact simple-swizzle@0.2.2
npm install --save-exact is-arrayish@0.3.2
npm install --save-exact error-ex@1.3.2
npm install --save-exact chalk-template@1.1.0
npm install --save-exact backslash@0.2.0rm -rf node_modules package-lock.json
npm cache clean --force
npm install --ignore-scripts(Run --ignore-scripts on first pass, then re-enable after dependency tree is verified safe.)
npm ls debug chalk "ansi-*" "*ansi*" "wrap-ansi" "color-*" supports-* \
"*swizzle*" "*arrayish*" error-ex backslash chalk-templateEnsure none of the listed bad versions remain.
- Rebuild Docker images from scratch (
--no-cache). - Reimage CI/CD runners or dev workstations if they had the bad versions.
- Run EDR scans; consider gold image rebuilds.
- Rotate credentials (API keys, cloud creds, npm tokens, wallet secrets).
- Wire OSV/GHSA advisories into SCA (e.g., Dependabot, Snyk, OSV-Scanner).
- Watch telemetry for address-rewrite anomalies in Web3/crypto flows.
- Generate SBOMs (CycloneDX/SPDX) for auditing.
-
CI Denylist Script
# scripts/deny-bad-npm.sh set -euo pipefail BAD=( "debug@4.4.2" "chalk@5.6.1" "ansi-styles@6.2.2" "strip-ansi@7.1.1" "ansi-regex@6.2.1" "wrap-ansi@9.0.1" "color-convert@3.1.1" "color-string@2.1.1" "color-name@2.0.1" "slice-ansi@7.1.1" "supports-color@10.2.1" "supports-hyperlinks@4.1.1" "has-ansi@6.0.1" "simple-swizzle@0.2.3" "is-arrayish@0.3.3" "error-ex@1.3.3" "backslash@0.2.1" "chalk-template@1.1.1" ) npm ls "${BAD[@]}" && { echo "❌ Found malicious versions"; exit 1; } || echo "✅ Clean"
-
Lockfile policy: enforce
overrides/resolutions. -
No postinstall on first install:
npm ci --ignore-scripts
-
Private registry hygiene: quarantine flagged versions.
-
Mandatory 2FA/passkeys for npm maintainers.
-
SBOM + provenance: require signed build artifacts.