Learn how the March 2026 Axios supply chain compromise hijacked automated builds and how to secure your production CI/CD pipelines from registry attacks.

Imagine waking up to find that one of the most trusted third party libraries in your software stack has been turned into a delivery vehicle for state sponsored malware. On March 31, 2026, the JavaScript development community experienced exactly this scenario. A sophisticated supply chain attack hijacked the highly popular axios library on the NPM registry, silently embedding a cross platform Remote Access Trojan into thousands of automated builds and developer machines. For an HTTP client that boasts over 100 million weekly downloads, the reach of this compromise was immediate and alarming.
As a dedicated team that builds high scale web applications, we know how quickly upstream library compromises can bypass traditional firewalls and reach production. This incident was not a standard software vulnerability that could be patched with a minor code fix. It was a direct compromise of the library publisher's release path, bypassing git repositories, branch protections, and peer reviews entirely. Anyone running an automated build or a clean installation during the exposure window was silently infected.
In this guide, we will break down the mechanics of the Axios supply chain attack, explain how the malware executed its anti forensic cleanup, and provide a comprehensive audit framework. We will also outline the exact strategies we deploy to protect production pipelines from similar supply chain threats. Whether you run a startup with rapid release cycles or coordinate enterprise infrastructure, this playbook will help you secure your Node.js environments.
The Axios NPM supply chain compromise was an upstream registry hijack on March 31, 2026, where threat actors compromised a lead maintainer's account to publish backdoored packages (axios@1.14.1 and axios@0.30.4). It affects continuous integration and continuous delivery (CI/CD) pipelines by automatically executing a malicious postinstall script during dependency installation, deploying a cross platform Remote Access Trojan that exposes environment secrets and cloud credentials.
To understand how this attack bypassed normal security gates, we have to look at how packages are published to public registries. The attacker did not submit a malicious pull request to the official Axios GitHub repository. Doing so would have triggered automated linting, unit testing, and manual code reviews by other maintainers. Instead, the threat actor targeted the NPM registry account of @jasonsaayman, a primary maintainer of the project.
According to the official Axios GitHub Post Mortem, the attacker gained full access to the maintainer's NPM account and immediately updated the registered email address to an anonymous ProtonMail account (ifstap@proton.me). This action locked the legitimate owner out of any password recovery or account management options. With total control of the publishing credentials, the attacker bypassed the project's official GitHub Actions workflows and published the malicious versions directly from the command line.
The compromised releases, specifically axios@1.14.1 (tagged as latest) and axios@0.30.4 (tagged as legacy), were live on the NPM registry for just under three hours. Because many modern CI/CD systems are configured to fetch the latest minor or patch releases automatically, the poisoned package was pulled into thousands of pipelines. This direct CLI publishing method meant there were no corresponding git tags, commits, or release branches in the public Axios repository, making the backdoor completely invisible to teams that only monitor source control changes.
4 in 10 software supply chain attacks bypass source control entirely by publishing malicious artifacts directly to public registries.
During our tech partnership & consultation engagements, we frequently emphasize that git history is not a single source of truth for runtime dependencies. A package on NPM can contain entirely different files than the corresponding release branch on GitHub. In this case, the attacker took advantage of this exact gap, ensuring that static application security testing tools scanning the GitHub repository would find absolutely nothing wrong.
Rather than editing the core Axios codebase, which might have broken HTTP functionality and triggered immediate alerts, the attacker used a clever evasion technique. They introduced a brand new, phantom dependency into the package.json file of the compromised releases. This dependency was named plain-crypto-js@4.2.1.
The package plain-crypto-js was purpose built for this operation. Threat intelligence indicates that the attacker published a clean placeholder version (plain-crypto-js@4.2.0) eighteen hours prior using a separate disposable account. This was likely done to establish a brief history on the registry and evade automated security scanners that flag brand new packages. When a pipeline or developer machine installed the compromised Axios versions, NPM resolved plain-crypto-js as a transitive dependency and downloaded it.
The real danger lay in the postinstall hook declared in the malicious dependency's configuration. NPM automatically runs scripts defined in the preinstall, install, or postinstall fields during package installation. The moment npm install was executed, the package ran node setup.js, which initiated the compromise. This script identified the host operating system (Windows, macOS, or Linux) and fetched a platform specific second stage Remote Access Trojan from attacker controlled command and control servers, including domains like sfrclak.com.
What made this attack particularly insidious was its anti forensic design. After executing the malicious payload, the installer script swapped the modified package.json in node_modules with a clean decoy version. It then deleted its own installation artifacts and dropper files. Within 1.1 seconds of execution, the evidence of the postinstall trigger was erased from the disk, leaving the local directory looking entirely clean to basic file integrity checkers.
To help team leads and product managers visualize how an upstream dependency compromise flows from a hijacked account down into a corporate environment, we have mapped out the entire infection vector below. This sequence demonstrates the speed at which automated pipelines fetch and execute compromised code.
This timeline highlights how narrow the window of response is for security teams. In just under three hours, automated deployment processes around the globe fetched, installed, and executed hostile code. If your build server ran a scheduled release or a test suite during those 179 minutes, it was exposed to the Remote Access Trojan.
Following the initial discovery of the attack, deep threat intelligence analysis by security firms like Huntress and Elastic Security Labs began uncovering connections to highly sophisticated threat actors. The cross platform Remote Access Trojan delivered by the dropper showed remarkable consistencies across Windows, macOS, and Linux. Despite being written in different languages, PowerShell for Windows, C++ for macOS, and Python for Linux, all three implants shared identical command sets, beacon intervals, and communication protocols.
Researchers eventually linked the forensic artifacts of this campaign to previous operations run by NICKEL GLADSTONE, a state sponsored group known for generating revenue and collecting intelligence for the North Korean regime. This actor is also tracked under names such as SAPPHIRE SLEET and BlueNoroff. According to reports from the Huntress Blog, the internal project names and code structures inside the macOS binary directly overlap with the webT module from the infamous RustBucket malware campaigns.
This state sponsored connection changes the stakes for affected organizations. The objective of these threat actors is rarely simple disruption. Instead, they focus on long term persistence, credential harvesting, and code signing certificate theft. When the Trojan is executed inside a pipeline runner, it immediately attempts to read environment variables, cloud config files, and version control tokens. This information is packaged and exfiltrated back to the command and control infrastructure, allowing the hackers to establish access that persists long after the compromised Axios package is deleted.
If you or your team were active on March 31, 2026, the safest starting assumption is that your systems may have executed hostile code. You must systematically audit your local machines, build servers, and container images. Because of the malware's self deleting nature, simply opening node_modules to look for suspicious files will not prove a system is clean.
We recommend beginning your audit by checking the dependency tree across all active repositories. You can query your package manager directly to find if any project resolved to the bad versions. The terminal command npm list axios will traverse your dependency tree and output the exact versions currently installed. If you see 1.14.1 or 0.30.4 anywhere in that output, you have a confirmed exposure.
# Example of a compromised dependency output:
project-root@1.0.0
└── axios@1.14.1 (compromised)You must also scan your lockfiles, such as package-lock.json, yarn.lock, or pnpm-lock.yaml. Look closely for any entries containing plain-crypto-js. If this package is declared as a dependency under Axios, or if its registry resolution URL points to version 4.2.1, your build environment has fetched the malicious dropper. In addition, you should inspect your enterprise artifact repositories, such as Artifactory or Nexus, for cached versions of these compromised packages and purge them immediately.
When we perform comprehensive code audits during our maintenance & customer support operations, we often find that teams rely too heavily on loose version ranges. For example, declaring ^1.14.0 in your package.json allows the package manager to automatically fetch any minor or patch release, including the compromised 1.14.1 version, if a lockfile is not present or is bypassed during a clean install.
To prevent this, you must enforce strict lockfile compliance across all development environments. A lockfile records the exact version and cryptographic hash of every package in your dependency tree. However, simply having a lockfile is not enough if developers regularly run updates without auditing the changes. In our guide on GitHub Actions Workflow Security Risks, we detail how unpinned dependencies and automated dependency update bots can silently introduce malicious packages into production branches.
To audit your lockfiles effectively, we recommend implementing automated lockfile scanners. These tools analyze your lockfiles for sudden changes, such as a package resolving to an entirely new, unverified domain or a package changing its publisher signature. They can also flag packages that were published very recently, allowing you to hold back updates until the community has had time to verify their safety.
Below is a comparison of dependency resolution strategies and their vulnerability to supply chain hijacks:
| Resolution Strategy | Vulnerability Level | Execution Risk | Recovery Effort |
|---|---|---|---|
Loose Ranges (^1.14.0) |
Critical | Automatically pulls malicious patches on clean installs. | High |
Pinned Versions (1.14.0) |
Medium | Safe from auto updates, but vulnerable to transitive dependency hijacks. | Medium |
| Strict Lockfiles | Low | Only executes verified hashes, but requires manual audit during updates. | Low |
| Private Proxy Caching | Minimal | Blocks unapproved upstream packages from entering the build network. | Minimal |
Modern continuous integration servers are highly attractive targets for supply chain attackers. They are often granted broad network access, write permissions to container registries, and direct access to deployment environments. If a malicious postinstall script runs on a pipeline runner, it can access sensitive environment variables, such as AWS keys or NPM publishing tokens, and exfiltrate them.
To mitigate these risks, we recommend adopting a multi layered hardening strategy for your build pipelines. The first and most effective defense is to block the execution of lifecycle scripts entirely during dependency installation. By running npm install --ignore-scripts, you prevent NPM from executing any preinstall, install, or postinstall hooks. This single setting would have completely neutralized the Axios attack, as the plain-crypto-js payload would never have run.
Another crucial defense is restricting outbound network traffic from your build runners. A standard CI/CD runner should not need unrestricted access to the public internet. By implementing network egress filtering, you can restrict runners to only communicate with trusted services, such as GitHub and your private package registry. If a malicious script attempts to contact an unknown command and control domain, the connection will be blocked, preventing both payload delivery and credential exfiltration.
# Recommended NPM configuration for secure pipelines:
npm config set ignore-scripts true
npm config set min-release-age 3Setting a minimum release age for public packages is another highly effective policy. By configuring your package manager or private registry proxy to reject packages that were published less than three days ago, you create a buffer window. This ensures that if a maintainer account is hijacked and a malicious version is published, security researchers and registry administrators have time to detect and remove the package before your pipelines ever see it.
To protect your organization, you must move from a passive defense model to an active security architecture. The diagram below illustrates how we structure secure, zero trust pipelines for our web application design & development clients. This architecture ensures that even if a compromised package slips past your version control, it is blocked at multiple stages before execution.
This breakdown shows that account takeovers represent the single largest entry point for malicious NPM packages. By hardening your local and cloud environments against unauthorized executions, you neutralize the impact of these compromised accounts before they can deliver their payloads.
If your audits reveal that a developer machine, CI/CD runner, or production server installed axios@1.14.1 or axios@0.30.4 on March 31, 2026, you must initiate full incident response protocols. Because this attack delivered an active Remote Access Trojan, simply downgrading the package to a safe version like 1.14.0 is entirely insufficient. The backdoor may have already established persistence or harvested sensitive data.
Your first step must be to isolate and quarantine any affected endpoints. Disconnect developer laptops and build servers from the corporate network immediately to prevent lateral movement. For ephemeral CI/CD runners, terminate the active virtual machine or container instance. You must perform deep forensic scans on these systems to look for persistent files, such as the system.bat or setup.js scripts, or unauthorized background processes executing PowerShell, Python, or bash.
Next, you must assume that all credentials exposed to the compromised environment have been leaked. This includes:
You must immediately revoke and rotate every single secret injected into the compromised runtime. In our experience, attackers move incredibly fast, often utilizing compromised API keys within hours of exfiltration. If you are using automated development pipelines, look into our custom software development advisory services where we help teams transition to short lived, openid connect credentials that do not rely on static secrets.
Achieving a highly secure software supply chain requires balancing risk against operational speed. Implementing a completely zero trust dependency pipeline is not free. It introduces friction, increases build times, and requires dedicated engineering hours to maintain.
First, implementing strict registry proxies and minimum package age rules can slow down your development velocity. If your team is trying to ship a critical feature or hotfix, waiting three days for an upstream dependency patch to pass your "age policy" can be frustrating. running npm install --ignore-scripts can break legitimate packages that rely on compilation scripts to build native binaries. Resolving these broken builds requires your senior engineers to manually write wrapper configurations, which can cost between $2,000 and $5,000 in lost productivity per repository.
For early stage startups building a rapid prototype, implementing enterprise-grade egress filtering and custom artifact proxies might not make sense. When resources are extremely tight, a simpler approach, like strict lockfile checks and mandatory multi factor authentication on all publishing accounts, provides excellent protection without the overhead. However, as soon as your product handles user data, financial transactions, or scales into production, the investment in supply chain security becomes mandatory.
The common pitfall we see in the wild is when teams apply security settings blindly. For instance, turning on --ignore-scripts without testing your local builds can cause silent runtime failures in packages that rely on precompiled assets. A successful security posture requires careful planning, testing, and a partner who understands how to balance protection with developer experience.
Key takeaways
- The Attack Vector: The Axios compromise hijacked a lead maintainer's account to bypass source control gates and publish malicious versions directly to NPM.
- The Payload: The attack injected
plain-crypto-js@4.2.1which used postinstall scripts to deploy a cross platform Remote Access Trojan on Windows, macOS, and Linux.- Immediate Action: Audit lockfiles immediately for
axiosversions1.14.1or0.30.4and theplain-crypto-jsdependency.- The Remediation: If exposed, isolate the affected environments, perform deep forensic scans, and rotate all secrets, keys, and tokens.
- Prevention: Harden CI/CD pipelines by disabling postinstall scripts with
ignore-scriptsand enforcing strict network egress filtering.
No, the attacker did not modify the public Axios GitHub repository. They gained access to the lead maintainer's NPM account and published the malicious packages directly via the command line, bypassing git branch protections and automated testing pipelines entirely.
The compromised versions are axios@1.14.1 (the latest release at the time) and axios@0.30.4 (the legacy release). Safe versions that you should downgrade to are axios@1.14.0 and axios@0.30.3.
The package plain-crypto-js was a malicious dependency injected by the attacker into the compromised Axios versions. When installed, it ran a postinstall script that detected the host operating system and downloaded the Remote Access Trojan.
The setup script included self destruct logic that deleted the installer files and swapped the compromised package.json with a clean copy inside node_modules within 1.1 seconds, hiding the postinstall trigger from basic file integrity checks.
No, simply downgrading the package is not enough. Because the Remote Access Trojan was executed, you must treat the host system as fully compromised, isolate it, perform forensic analysis, and rotate all secrets, API keys, and tokens.
You can disable the execution of lifecycle scripts by running npm install --ignore-scripts or setting ignore-scripts=true in your .npmrc file. This prevents malicious postinstall hooks from executing automatically.
A minimum release age policy blocks your package manager or private proxy registry from downloading packages published less than a set number of days ago, giving the security community time to detect and remove malicious updates.
Threat intelligence from security researchers and agencies has linked the digital signatures, command and control infrastructure, and malware structures to Nickel Gladstone, a state sponsored group associated with the North Korean regime.
Upstream supply chain attacks like the Axios compromise show that our modern software ecosystem is highly interconnected. Relying solely on the reputation of a popular package is no longer a viable security strategy. Organizations must actively audit their dependency trees, lock down their build pipelines, and prepare clear incident response playbooks.
Securing your delivery path does not mean slowing down your product development. By integrating automated scanning, disabling unneeded lifecycle scripts, and restricting outbound runner traffic, you can build a defensive shield around your production environments. This allows your team to focus on shipping features while resting assured that your infrastructure is protected against registry hijacks.
If you are planning to audit your development workflows or want to implement a zero trust CI/CD architecture, we are happy to help you design a secure solution that fits your scale. Take a look at our services or reach out to our engineering team to discuss how we can secure your next build.
01 · RelatedThe EU AI Act's Article 50 transparency rules are now active as of August 2, 2026. Learn how this changes your app architecture, watermarking pipelines, and UI patterns.
Read post
02 · RelatedLearn how to secure autonomous AI agents in production. Discover layered guardrail architectures, tool-level validation, and self-healing workflow patterns.
Read post
03 · RelatedSupabase Realtime binary payloads eliminate the base64 encoding tax. Learn how to scale your IoT dashboard performance and WebSocket data today.
Read postWe will reply in plain English within one business day, NDA on request. Discovery call is free.