Skip to main content
Mallory
← Back to News
package-repository-poisoningdependency-confusion-typosquatcredential-stealer-activitydefense-evasion-method

Malicious and Credential-Stealing npm Packages Target Developers via Obfuscation and Typosquatting

Supply Chain Risk · 3 sources · Updated 5mo ago · First seen Oct 29, 2025

Malicious and Credential-Stealing npm Packages Target Developers via Obfuscation and Typosquatting

Multiple malicious npm packages have been discovered targeting developers by employing advanced obfuscation techniques and typosquatting to mimic popular legitimate packages such as TypeScript, discord.js, ethers.js, nodemon, and Claude Code. Security researchers revealed that these packages use up to four layers of obfuscation—including eval wrapping, XOR encryption, URL encoding, and control flow manipulation—to evade static analysis and conceal credential-stealing malware. The attack chain often begins with deceptive tactics, such as displaying fake CAPTCHAs, and proceeds to exfiltrate sensitive information like IP addresses and credentials to attacker-controlled servers. In one notable case, a package impersonating the official Anthropic CLI was found to proxy commands and data back to the threat actor, enabling both credential theft and remote command execution.

These incidents highlight the persistent risks posed by weak validation and oversight in the npm ecosystem, allowing threat actors to publish lookalike packages that are difficult to distinguish from legitimate ones. The sophisticated payloads not only target local developer environments but can also compromise CI/CD pipelines, amplifying the potential impact. Security experts emphasize the need for improved package metadata validation and greater vigilance among developers to mitigate the risk of supply chain attacks through open-source dependencies.

Why it matters

Impact assessment

Multiple malicious npm packages targeted developers and build environments by impersonating widely used packages, creating direct risk for software engineering teams, CI/CD infrastructure, and organizations that consume JavaScript dependencies. Impact is high because the malware steals credentials, browser data, API keys, OAuth tokens, JWTs, and platform keychain contents, and at least one package also enabled remote command execution by proxying Anthropic CLI activity to an attacker.

Affected populations and scope

  • Primary targets: developers, DevOps teams, CI/CD runners, and organizations using npm-based software supply chains.
  • Impersonated ecosystems and brands included TypeScript, discord.js, ethers.js, nodemon, and Claude Code.
  • The campaign involved 10 malicious npm packages.
  • The packages were first published on 2025-07-04.
  • Reported download volume was nearly 10,000, indicating meaningful exposure rather than isolated testing.
  • The activity reflects broad opportunistic targeting through typosquatting, not a narrowly targeted intrusion set.

Severity and business impact

  • Credential theft can lead to source code theft, cloud account compromise, package publishing abuse, CI/CD takeover, and downstream supply-chain compromise.
  • Theft of browser cookies, passwords, API keys, OAuth tokens, JWTs, and LaunchPad credentials creates both immediate account takeover risk and persistent access opportunities.
  • Compromise of developer workstations can cascade into production environments if stolen secrets grant access to repositories, artifact registries, deployment systems, or cloud consoles.
  • The story states affected systems should be treated as fully compromised.

Known exploitation status

  • There is evidence of active malicious distribution in the wild through npm.
  • As of the reporting date, all 10 malicious packages reportedly remained active on npm despite disclosure.
  • No CVE is associated with this activity; this is a software supply-chain abuse case rather than a disclosed product vulnerability.
Does this reach your builds?Trace attribution and downstream blast radius.
Trace the chain
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

3 events · Oct 27, 2025 – Oct 31, 2025
  1. Oct 31, 20251y ago

    Security guidance is published on practical npm supply-chain defenses

    A follow-up security discussion highlighted practical steps for staying safe on npm, reflecting industry response to ongoing malicious-package threats. This was guidance and awareness activity rather than a new attack event.

  2. Oct 29, 20251y ago

    Researchers reveal credential-stealing npm packages using four obfuscation layers

    Analysis published days later described npm packages that stole credentials while hiding their behavior behind four layers of obfuscation. The reporting indicates a broader malicious package campaign or additional technical detail beyond the initial discovery.

  3. Oct 27, 20251y ago

    Malicious npm package impersonating Claude Code is discovered

    Researchers identified a malicious npm package masquerading as Anthropic's Claude Code tool. The package was designed to deceive developers into installing a trojanized dependency under the guise of a legitimate AI coding utility.

Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, breaches, and observables Mallory has linked to this story. Indicator values are masked here and available in full in the app.

Open in app →

Malware

1 linked

Observables

1 linked

Indicator values are masked on this page. See the values in Mallory Domains, IPs, hashes, and URLs are exportable to your SIEM.

Do you run this?See attribution and downstream blast radius, and whether this package or vendor reaches your builds.
Trace the Supply Chain
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.