jscrambler npm Compromise: A Rust Infostealer That Went Looking for Your AI Assistant's Credentials
Stolen publishing credentials pushed malicious releases of a security vendor's own package — and the payload targeted developer secrets, crypto wallets, and AI coding-tool configs
Date: July 11, 2026 Primary Source: The Hacker News (The Hacker News) · Socket (Socket)

Executive Summary
- What: On July 11, 2026, an attacker used stolen publishing credentials to push malicious versions of the
jscramblernpm package and four of its plugins. Apreinstallhook dropped and executed a native Rust infostealer, with a build for Windows, macOS, and Linux. (The Hacker News) - Who is affected: Developers, CI/CD runners, and build systems that installed the affected versions. The package sees roughly 15,800+ weekly downloads; 1,479 downloads of malicious versions occurred before removal. (Socket)
- Severity: High — the payload harvested cloud credentials, CI tokens, browser sessions, crypto wallets, Bitwarden vaults, and the configuration files of AI coding assistants including Claude Desktop and Cursor. (The Hacker News)
- Action required: Check lockfiles for the affected versions, rotate every credential reachable from affected machines, and add an execution-control layer so an install hook cannot run an unapproved binary.
Overview
There is an uncomfortable irony in this incident: jscrambler is a JavaScript security tool. Its npm package was compromised anyway — not through a flaw in the code, but through stolen publishing credentials.
That is worth sitting with, because it disposes of the most common mental shortcut in dependency management. "It's from a security vendor" is a statement about who wrote the software. It says nothing about who published the specific version your build just pulled.
Socket flagged the malicious release six minutes after publication. (Socket) Six minutes is fast. It is also long enough for an automated build to run.
Threat Summary
| Field | Detail |
|---|---|
| Incident | jscrambler npm supply-chain compromise |
| Initial public report | July 11, 2026 |
| CVE ID | None — credential compromise, not a software vulnerability |
| Affected packages | jscrambler 8.14.0, 8.16.0, 8.17.0, 8.18.0, 8.20.0; jscrambler-webpack-plugin 8.6.2; gulp-jscrambler 8.6.2; grunt-jscrambler 8.5.2; jscrambler-metro-plugin 9.0.2 (The Hacker News) |
| Attack vector | Stolen npm publishing credentials |
| Execution trigger | preinstall hook (early versions); later versions executed on import or CLI run (The Hacker News) |
| Payload | Native Rust infostealer — separate builds for Windows, macOS, Linux |
| Exploited in the wild | Yes — 1,479 malicious downloads before removal (Socket) |
| Remediation | All affected versions deprecated and removed from normal dependency resolution |
Technical Analysis
How the Attack Works
- Credential theft. The attacker obtained npm publishing credentials for the
jscramblerpackages. No vulnerability in the package itself was exploited (MITRE ATT&CK T1195.002). - Coordinated publication. Malicious versions of the main package and four plugins — webpack, gulp, grunt, and metro — were pushed together, so a project pinning the main package could still be reached through a plugin.
- Install-time execution. A
preinstallhook dropped and executed a native binary, with a distinct build for each of Windows, macOS, and Linux (T1059). - The safeguard that stopped working. Later malicious versions dropped the install hook and instead executed on import or when the CLI ran. This is the detail defenders should note:
npm install --ignore-scripts, the standard advice against install-time payloads, no longer offered protection. (The Hacker News) - Credential harvesting. The payload swept for cloud credentials, CI tokens, browser sessions, cryptocurrency wallets, Bitwarden vaults, and the config files of AI coding tools including Claude Desktop and Cursor (T1552, T1555).
Payload and Impact
Two things distinguish this from a routine npm incident.
First, the AI-tooling target. Attackers are now explicitly enumerating the credential stores of AI coding assistants. Those configuration files frequently hold API keys with real spending authority and, increasingly, tokens for connected services. They are production secrets that most organizations have never inventoried as such.
Second, the import-time pivot. Moving execution from preinstall to import time defeats the most widely recommended mitigation for malicious packages. Advice to run npm install --ignore-scripts is still good advice — it is simply no longer sufficient on its own.
Why Traditional Defenses Struggle
- Reputation checks pass. The package name, the publisher, and the registry were all legitimate. Only the version was malicious.
- The dropped binary is new. A freshly compiled Rust executable has no signature history for antivirus to match.
--ignore-scriptswas bypassed by design. Import-time execution sidesteps the control most teams rely on.- Build systems run unattended. A CI job at 3 a.m. installs, builds, and exits. There is no human to notice.
- Plugins widen the blast radius. Pinning the primary package is not enough when four companion packages ship the same payload.
How White Cloud Security Trust Lockdown Stops This
Least-Privilege Zero-Trust App Firewall
This incident sits squarely in the space Default-Deny addresses, because the decisive moment is a native binary attempting to execute on a developer workstation or build server.
White Cloud Security (WCS) Trust Lockdown enforces Zero-Trust Application Control: only explicitly approved software executes; unknown or unapproved software is denied before it can run.
| Attack step | WCS control that applies |
|---|---|
preinstall hook drops a native Rust binary |
The binary is not on the Permit List — denied before execution |
| Later versions execute on import or CLI run | Same outcome: the payload still has to run a binary, and an unapproved binary is denied regardless of what triggered it |
| Payload sweeps for cloud keys, CI tokens, wallets, Bitwarden, AI tool configs | Harvesting requires the stealer to be running — denying execution would help block the collection stage |
| Attacker recompiles or renames the payload | Handprint identity means a changed file is a different file — still denied |
Note the second row, because it is the useful one. The attacker's clever pivot from install hook to import time defeats --ignore-scripts — but it does not defeat execution control, because both paths end in the same place: an unapproved executable trying to start.
Handprint Identity
WCS identifies files by handprint — SHA-1, SHA-256, SHA-512, MD5, CRC32, and file length. A stealer rebuilt for a new campaign, renamed to look like a build tool, or recompiled for a different platform produces a different handprint and remains denied. Approval is not inherited from the package name, the publisher, or the registry it came from.
Administrators can also approve software by code-signing certificate through Trust Profiles, so legitimately signed vendor tooling does not require file-by-file approval.
What this does not do: execution control would not have prevented the credential theft that let the attacker publish, and it does not replace npm token hygiene, 2FA on publishing accounts, lockfile discipline, or dependency scanning. It is a preventive layer that stops the payload from running once it arrives.
At White Cloud Security, we continue to track and report new hacking methods and tools — not just because of their immediate threat, but because patterns of reuse often expose the playbooks of these cybercriminal groups.
Recommended Mitigations
- Search lockfiles and build caches for the affected versions listed in the Threat Summary — not just current
package.jsonentries. - Rotate credentials reachable from affected machines: cloud keys, CI/CD tokens, npm and GitHub tokens, SSH keys, and browser-session cookies.
- Rotate AI coding-assistant API keys and review those configuration files. Treat them as production secrets, because they are.
- Check Bitwarden and other vault sessions on developer workstations; re-lock and rotate where exposure is plausible.
- Do not rely on
--ignore-scriptsalone. Keep it, but recognize that import-time payloads defeat it. - Require 2FA for npm publishing and scope publish tokens narrowly.
- Apply Default-Deny application control on developer endpoints and build servers so a dropped binary cannot execute.
Indicators of Compromise
The affected package versions are the primary public indicator:
jscrambler 8.14.0, 8.16.0, 8.17.0, 8.18.0, 8.20.0
jscrambler-webpack-plugin 8.6.2
gulp-jscrambler 8.6.2
grunt-jscrambler 8.5.2
jscrambler-metro-plugin 9.0.2
Consult Socket and the vendor advisory for current file hashes before hunting on disk. (Socket)
Key Takeaways
- A security vendor's own npm package shipped malware — via stolen publishing credentials, not a code flaw.
npm install --ignore-scriptswas not enough. Later versions executed at import time instead of install time.- Attackers are now explicitly targeting AI coding-assistant credential stores alongside cloud keys and crypto wallets.
- Six-minute detection still let 1,479 malicious downloads through — unattended builds do not wait for advisories.
- Both the install-hook and import-time paths end in an unapproved binary trying to execute, which is what Default-Deny denies.
- Handprint identity denies renamed or recompiled payloads that keep a familiar package name.
References
- The Hacker News — "Compromised jscrambler 8.14.0 npm Release Drops Rust Infostealer During Install," July 2026
- Socket — "jscrambler npm Package Compromised in Supply Chain Attack"
- SafeDep — "Official jscrambler npm Package Compromised Across Multiple Releases"
- Jscrambler — "Security Advisory: Unauthorized Publication of a Malicious npm Package"
Further Reading
- AsyncAPI CI/CD Compromise: Malware That Runs When You Import, Not When You Install
- Miasma npm Supply-Chain Attack: Why Trusted Software Must Be Verified
- Mastra npm Compromise: Blocking Malicious Payloads After a Poisoned Dependency
- Axios npm Supply Chain Attack: Sapphire Sleet and Zero-Trust Defense
Jscrambler is a trademark of Jscrambler, Lda. npm is a trademark of npm, Inc. Socket is a trademark of Socket, Inc. Bitwarden is a trademark of Bitwarden, Inc. Claude is a trademark of Anthropic PBC. Cursor is a trademark of Anysphere, Inc. None of these organizations is affiliated with, and none endorses, White Cloud Security, Inc. All technical details are drawn from the reporting linked above. Trust Lockdown™ is a trademark of White Cloud Security, Inc.