Virtual Round Table · Jul 22

View the event
Poisoned jscrambler npm Packages Hunt for Crypto Wallets and AI Coding Assistant Secrets
Cybersecurity

Poisoned jscrambler npm Packages Hunt for Crypto Wallets and AI Coding Assistant Secrets

Attackers used stolen publishing credentials to push malicious jscrambler versions to npm, dropping native binaries that raided crypto wallets, cloud keys, and the config files of AI coding tools like Claude and Cursor.

PublishedJuly 21, 2026
Read time7 min read
Share

What was compromised

Attackers published malicious versions of the jscrambler npm package and several related plugins after obtaining a valid publishing credential for the project. The compromise began on July 11 with version 8.14.0 and expanded across a run of releases including 8.16.0, 8.17.0, 8.18.0, and 8.20.0, before a clean 8.22.0 restored the package. Jscrambler is a JavaScript protection and obfuscation product, and its tooling is pulled into build pipelines, which put the poisoned releases directly in front of developers and continuous-integration systems. The package drew roughly 15,800 weekly downloads, giving the attackers a meaningful pool of developer workstations and build servers to target.

The delivery mechanism evolved across the malicious versions. In releases 8.14.0 through 8.17.0 the malware executed through npm preinstall hooks, the lifecycle scripts that run automatically when a package is installed. From version 8.18.0 onward the attackers shifted tactics, injecting their payload directly into the package's dist/index.js and command-line files so that the code ran when the package was used rather than only when it was installed. That shift matters because it defeats the common defense of installing with lifecycle scripts disabled, a reminder that attackers adapt quickly once a mitigation becomes popular among defenders.

Native binaries as the payload

Rather than relying solely on scripts, the malware dropped platform-specific native executables tailored to the victim's operating system. Socket's analysis found ELF binaries for Linux, arm64 Mach-O binaries for macOS, and PE32+ executables for Windows, packaged in a container roughly 7.8 megabytes compressed. Shipping compiled binaries gives an attacker capabilities and stealth that a simple script cannot match, since native code can evade many script-focused scanners and perform system-level operations directly. It also signals a level of effort and cross-platform planning that puts this campaign above the crude, single-platform samples that litter package registries.

The use of compiled payloads inside an npm package is a notable escalation in the supply-chain threat model. Developers and their security tools have grown accustomed to scrutinizing install scripts and obvious script-based malware, so a package that stages a native binary sidesteps a chunk of that scrutiny. Once running, that binary can enumerate the filesystem, read protected stores, and exfiltrate data with the full privileges of the developer's session. The breadth of what it collected, described below, reflects how much a native payload can accomplish once it lands on a machine that a developer trusts and works from every day.

What it stole

The target list reads like an inventory of a modern developer's most sensitive assets. The malware hunted for cryptocurrency wallets including MetaMask, Trust Wallet, Coinbase, Phantom, and Exodus, going straight for the funds that make developer machines a lucrative target. It reached for cloud platform credentials across AWS, Google Cloud, and Azure, including their metadata endpoints, the keys that unlock production infrastructure. It scraped browser data from Chrome, Firefox, Brave, and Opera, and it grabbed session tokens for Discord, Slack, Telegram, and Steam. It also collected SSH keys and operating-system keyrings, the credentials that open the door to servers and secret stores.

The most telling additions are the AI development tools. The malware specifically sought the configuration files of AI coding assistants and Model Context Protocol setups, naming Claude, Cursor, VS Code, and Zed among its targets. Those config files increasingly hold API keys, tokens, and connection details for the AI services and internal systems that developers wire into their assistants. As teams grant AI coding tools deeper access to codebases, cloud accounts, and internal APIs through MCP servers, the local files that configure those integrations become a concentrated store of secrets. This campaign is among the clearest signs yet that attackers have noticed and are building tooling to harvest exactly that material.

The credential theft behind it

The root cause was a stolen npm publishing credential. The attacker was able to publish the malicious package because they held a valid credential for the account, which let the poisoned versions inherit the trust and reach of the legitimate project. This is the recurring failure mode of the npm ecosystem, where a single compromised token or account translates directly into malware delivered to every consumer of a package. It requires no vulnerability in the victim's code, only the ability to push a new version to a package the victim already depends on and updates without much thought.

Jscrambler responded by revoking the compromised publishing credentials and rotating related secrets, the correct containment steps once such an account is known to be abused. The broader defense, though, has to shift upstream to how publishing is authenticated. Requiring phishing-resistant multi-factor authentication for publishing, adopting trusted publishing that ties releases to verified continuous-integration workflows, and scoping and expiring tokens all reduce the odds that a single stolen credential can weaponize a popular package. Until those controls are universal, credential theft will remain the cheapest and most reliable way to turn a trusted dependency into a malware distribution channel.

Speed of detection cut both ways

One encouraging detail is how fast the malicious release was caught. Socket's automated analysis flagged the first poisoned version within six minutes of its publication, a response time that only automated scanning of new package versions can achieve. That speed limits the exposure window and demonstrates the value of continuous, machine-driven monitoring of the registries that feed enterprise build pipelines. Manual review could never operate at that cadence across the volume of packages and versions that npm publishes every day, which is why registry-scanning tooling has become a practical necessity rather than a luxury.

Fast detection does not fully close the risk, because some developers and pipelines will have installed the malicious version in the minutes and hours before it was pulled or flagged. Any machine that ran an affected release should be treated as compromised, with the assumption that wallets, cloud keys, browser sessions, SSH keys, and AI tool configurations on that machine may have been exfiltrated. The remediation is to rotate every credential that could have been present, from cloud keys to API tokens to SSH keys, and to review the accounts and services those credentials protect for signs of misuse rather than assuming a quick removal ended the incident.

What developers and CISOs should do

For engineering organizations, this campaign is a prompt to harden the developer endpoint and the dependency pipeline together. Pin dependency versions and vet updates rather than pulling the latest release automatically, deploy registry-scanning tooling that flags malicious versions in near real time, and isolate build environments so that a poisoned package cannot reach production secrets or crypto wallets sitting on a developer's primary machine. Disabling install scripts helps, and this incident shows it is not enough on its own, since the attackers moved their payload to run at usage time to evade exactly that control.

The AI-tooling angle deserves specific attention from security leaders. As teams adopt AI coding assistants and connect them to internal systems through MCP servers, the local configuration files for those tools become a high-value target that traditional secret-management practices often overlook. Inventory where AI assistants store their credentials, keep those secrets out of plaintext config files where possible, scope the access granted to AI tools tightly, and monitor for their exfiltration. The jscrambler campaign is an early example of attackers purpose-building malware to raid AI development environments, and the organizations that treat those environments as sensitive now will be the ones not caught out when the next such package lands.

Tagged#news#security#cybersecurity#breach#cisa#ransomware#zero-day#supply-chain#ai-security#jscrambler#npm#software-supply-chain#credential-theft#mcp#ai-coding-assistants#cryptocurrency-wallets#socket