Skip to main content
Axios npm Package Compromised: A Two-Hour Window That Could Have Wrecked Your PipelineIncident
4 min readFor Compliance Teams

Axios npm Package Compromised: A Two-Hour Window That Could Have Wrecked Your Pipeline

What Happened

On March 31, 2026, malicious versions of the axios npm package (1.14.1 and 0.30.4) were published to the npm registry using a compromised maintainer account (@jasonsaayman). The attacker deployed a cross-platform remote access trojan (RAT) through a pre-staged dependency called [email protected]. These malicious packages were available for about two hours before being removed at 03:29 UTC.

Axios is a widely used npm package, with millions of weekly downloads. Any CI/CD pipeline or developer environment that pulled these versions during that window potentially installed a RAT with full system access.

Timeline

March 31, 2026, ~01:30 UTC: Attacker gains access to @jasonsaayman's npm maintainer account.

~01:30 - 03:29 UTC: Malicious versions 1.14.1 and 0.30.4 published to npm registry, including [email protected] as a dependency.

03:29 UTC: Malicious versions removed from npm registry.

Post-incident: Security advisories issued. Organizations begin scanning for affected installations.

The two-hour window is deceptively short. Automated CI/CD pipelines running during this period would have pulled and built with the compromised package. Developer workstations performing fresh installs would have been infected. The impact depends on who was deploying code during those 120 minutes.

Which Controls Failed or Were Missing

Maintainer Account Security: The @jasonsaayman account was compromised, indicating weak authentication controls. There was no evidence of multi-factor authentication (MFA) enforcement or session monitoring to detect unauthorized access.

Dependency Integrity Verification: Organizations running affected builds lacked mechanisms to verify package integrity before installation. There were no automated checks against known-good hashes or signatures.

Lockfile Enforcement: Teams without strict lockfile policies were vulnerable. Any build process using version ranges (^1.14.0 or ~0.30.0) would have automatically pulled the malicious versions.

Egress Monitoring: The RAT communicated with external command-and-control infrastructure. Organizations without network egress controls or anomaly detection missed this indicator.

Dependency Vetting: The pre-staged plain-crypto-js package existed specifically for this attack. No automated scanning flagged a new, unvetted dependency being pulled into production builds.

What the Relevant Standard Requires

ISO/IEC 27001:2022 Control 8.31 (Separation of development, test and production environments) requires separating environments and controlling software installation. This includes verifying the integrity of software components. If your CI/CD pipeline automatically promotes builds without integrity checks, you're not meeting this control.

PCI DSS v4.0.1 Requirement 6.3.2 mandates secure development of custom software based on industry standards. This includes supply chain security, requiring security throughout the software development lifecycle, including dependency management.

NIST 800-53 Rev 5 Control SA-12 (Supply Chain Protection) requires supply chain protection measures, including integrity verification mechanisms. You need documented processes for validating software components before they enter your environment.

SOC 2 Type II CC7.2 (System Operations) requires logical and physical access controls to protect system components. This extends to your build pipeline. If an unauthorized package can enter your build without detection, your access controls are insufficient.

These standards converge on a single point: you must verify what enters your environment. The axios compromise exploited the gap between "we use open source" and "we verify open source."

Lessons and Action Items for Your Team

1. Enforce Lockfile Integrity in CI/CD

Stop using version ranges in production builds. Your package-lock.json or yarn.lock must be committed and enforced. Configure your CI/CD pipeline to fail if the lockfile doesn't match the installed packages.

Add this to your pipeline:

npm ci --audit

Not npm install. The ci command enforces the lockfile and fails on any mismatch. The --audit flag checks for known vulnerabilities.

2. Implement Mandatory MFA for All Maintainer Accounts

If your organization maintains any public packages, enforce hardware token MFA (not SMS) for all maintainer accounts. GitHub and npm both support this. If you're using shared accounts, stop. Each maintainer needs individual credentials with full audit logging.

3. Add Dependency Hash Verification

Tools like Snyk, Dependabot, or Socket can verify package hashes against known-good versions. Integrate one into your CI/CD pipeline before the build step. The check should fail the build if a package hash doesn't match the expected value.

4. Monitor Egress Traffic from Build Environments

Your CI/CD runners should not communicate with arbitrary external hosts. Implement egress filtering that allows only approved registries and artifact repositories. Alert on any unexpected outbound connections during builds.

5. Audit Your Dependency Tree Weekly

Run npm audit or equivalent for your package manager at least weekly. Don't just run it—act on the results. Create a policy: vulnerabilities above a certain severity must be addressed within a defined timeframe (e.g., critical within 48 hours).

6. Implement a Dependency Approval Process for New Packages

When a developer adds a new dependency, require review. Check: publication date, maintainer reputation, download statistics, recent activity. A package published days before being added to your project (like plain-crypto-js) should trigger additional scrutiny.

7. Create an Incident Response Playbook for Supply Chain Compromises

Document the steps to take if you detect a compromised dependency: freeze deployments, identify affected builds, scan for indicators of compromise, roll back to known-good versions. Test this playbook quarterly.

The axios incident lasted two hours. Your response window is equally narrow. The teams that survived this unscathed had these controls already in place. If you're implementing them now, you're building defenses after the attack. Start with lockfile enforcement and MFA—those prevent the most common attack vectors. Then layer in the monitoring and verification controls.

Every package in your dependency tree is a potential attack vector. Treat them accordingly.

Topics:Incident

You Might Also Like