Malicious npm Packages Using Typosquatting and Payload Obfuscation
Supply Chain Risk · 3 sources · Updated 5mo ago · First seen Feb 22, 2026

Threat researchers reported an npm supply-chain attack in which a typosquatted package (buildrunner-dev) delivered Pulsar RAT via a multi-stage Windows infection chain. The package executed a script that fetched a large, heavily obfuscated batch file (packageloader.bat) containing mostly “noise” to evade static detection, performed security-product checks (including ESET, Malwarebytes, and F-Secure), established persistence by copying itself as protect.bat into a hidden folder, and attempted privilege escalation/UAC bypass using fodhelper.exe.
Separate supply-chain reporting highlighted how package-name deception is evolving beyond human typos into “slopsquatting” (AI/hallucination squatting), where attackers register package names that LLMs commonly invent and then rely on developers installing them on AI recommendation. Documented tradecraft includes malicious postinstall scripts to exfiltrate secrets from developer environments (API keys, cloud tokens, npm auth tokens) and the use of URL-based dependencies to fetch external payloads at install time, allowing the published package to appear benign to naive scanners.
Why it matters
Impact assessment
This story affects software development teams, CI/CD environments, and Windows developer workstations that install npm packages, especially where package installs run with postinstall hooks enabled. The impact is high because the observed campaign delivers Pulsar RAT with persistence, privilege escalation, and full remote control of compromised hosts, while the broader slopsquatting trend increases exposure to credential theft from developer environments.
Business impact
- Affected populations: Node.js/npm users, software engineers, build systems, and organizations that allow direct package installation from public registries.
- Most exposed environments: Windows endpoints used for development, CI runners with npm access, and organizations using AI assistants or autonomous agents to recommend/install packages.
- Potential consequences: developer workstation compromise, theft of API keys, cloud tokens, npm auth tokens, remote access to internal systems, and downstream software supply-chain risk.
- Operational impact: endpoint remediation, credential rotation, package provenance review, and possible rebuild of affected developer environments.
- Scope: broad opportunistic exposure for anyone installing malicious or hallucinated package names; the specific buildrunner-dev infection chain is targeted at Windows hosts after npm installation.
- Exploitation status: yes, malicious packages were identified in the wild on npm; the reporting describes active supply-chain abuse rather than a theoretical issue.
Extracted entities and facts
- Malicious npm package: buildrunner-dev
- Legitimate packages impersonated: buildrunner, build-runner
- Malware family: Pulsar RAT
- Security products checked by malware: ESET, Malwarebytes, F-Secure
- Additional slopsquatting example: unused-imports
- Legitimate package confused with unused-imports: eslint-plugin-unused-imports
- Additional hallucinated package example: react-codeshift
- Cross-ecosystem example: huggingface-cli


