---
answer: direct
beat: dev-practices
source: 1 article · updated: July 11, 2026
---

Does npm install --ignore-scripts protect against this attack?

Only partially. Early versions (8.14.0–8.17.0) ran through a preinstall hook that --ignore-scripts blocks entirely. Later versions (8.18.0, 8.20.0) moved the same payload into dist/index.js and dist/bin/jscrambler.js as self-executing functions, which run automatically on import or CLI use regardless of that flag being set.

Answered in

Malware Hid Inside a Popular Obfuscation Tool — and Went Hunting for Your AI Coding Agent's Credentials

Stolen npm credentials let attackers slip native-binary malware into jscrambler, hunting for Claude Desktop, Cursor, and Windsurf credentials.

Crashtech Editorial July 11, 2026 Development Best Practices

Read the full analysis

Other questions this article answers

More development best practices questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the Development Best Practices beat.