How Dependency Firewalls Block Malicious Packages

Summary
The article explains how install-time dependency firewalls can block malicious packages and outlines checks for malware, suspicious releases, typosquats and risky install scripts. It also promotes Aikido's tools and reports its package-analysis figures.
Key points
- Install-time checks can block malicious packages before they are downloaded or executed, including transitive dependencies.
- The article describes the 2026 axios incident, in which a malicious transitive dependency's postinstall hook reportedly delivered a cross-platform RAT.
- Coding agents and MCP servers create additional package-install surfaces; attackers may also register package names that agents hallucinate, a technique called slopsquatting.
- Suggested firewall checks include threat-feed matches, minimum package age, dependency-confusion and typosquat detection, install-script behavior, maintainer changes, and obfuscated code.
- The article recommends scoped names for internal packages to reduce dependency-confusion risk.
- Aikido says its Intel service analyzed roughly 7.5 million package versions in Q2 2026 and identified 19,500 as malicious; these are vendor-reported figures.
Article Details
- Defense Focus
- Block malicious or suspicious dependencies at install time, including transitive dependencies and packages installed by coding agents, MCP servers, or extensions.
- Detection Methods
- Check packages against a live threat-intelligence feed before download.
- Inspect install scripts with static rules and sandboxed execution, including their network connections, file access, and spawned processes.
- Review maintainer changes, version releases without matching source commits, and unexpected dependencies.
- Analyze raw package bytes to identify obfuscated code hidden in Unicode, whitespace, or image files.
- Use a minimum package-age threshold to delay recently published releases.
- Data Sources
- Package threat-intelligence feed and package-version data
- Install-script behavior, including network connections, file reads, and spawned processes
- Package publication age, maintainer changes, source-commit correspondence, and dependency changes
- Raw package contents and bytes
- Platforms
- Developer workstations
- CI pipelines
- IDE extensions
- Browser extensions
- MCP servers
- AI coding agents
- Defensive Actions
- Run a dependency firewall at the install command so flagged packages are blocked before download.
- Apply checks to transitive dependencies, not only packages explicitly requested by developers.
- Set a minimum package age of 24 to 48 hours where appropriate.
- Use scoped package names for internal dependencies to reduce dependency-confusion risk.
- Use workstation-level protection for installation paths that bypass the terminal, including extensions and MCP servers.
- Investigate unexpected maintainer changes, releases without matching source commits, and newly added dependencies.
MITRE ATT&CK
Vendors
Products
Aikido Device Protectionon their machines (e.g., IDE extensions, browser extensions, MCP servers, AI coding tools), Aikido Device Protection is the answer. It deploys through your existing MDM, runs on the same Intel underneath, andAikido IntelDependency firewalls exist because the volume of supply chain attacks makes them necessary. Aikido Intel now analyzes up to 100,000 malicious packages a day across open-source registries, up from around 20,000 a yearAxiosIn March 2026, attackers hijacked the axios maintainer's npm account and pushed two malicious versions of the library (used across ~100 million weekly downloads). The payload came in through a newly added transitiveChalkpackage that fed the axios attack existed for less than 24 hours before being pulled in. The debug and chalk compromise hit 18 packages with more than 2 billion combined weekly downloads in a single wave. AnyDebugpackage that fed the axios attack existed for less than 24 hours before being pulled in. The debug and chalk compromise hit 18 packages with more than 2 billion combined weekly downloads in a single wave.plain-crypto-js~100 million weekly downloads). The payload came in through a newly added transitive dependency, plain-crypto-js, whose postinstall hook dropped a cross-platform RAT onto every machine that ran the install.Safe Chaindevelopers, or teams that want to try the install-time check without deploying anything centrally, Safe Chain is a free, open-source dependency firewall for npm, yarn, pnpm, pip, uv, poetry, and other package
