# Critical Axios Supply Chain Attack Delivers Remote Access Trojan to Thousands of Developers


A sophisticated software supply chain compromise has injected malicious code into two widely-distributed versions of Axios, one of the JavaScript ecosystem's most essential HTTP client libraries. The attack, discovered on March 31, 2026, temporarily poisoned the npm package registry with trojanized releases that automatically pull remote access capabilities onto affected systems—a significant escalation in the ongoing war over JavaScript dependencies.


## The Threat


The compromise targeted Axios versions 1.14.1 and 0.30.4, injecting a malicious dependency named plain-crypto-js@4.2.1 that silently executes when developers run standard npm installation commands. Rather than delivering a complete payload immediately, the malicious package functions as a downloader: it connects to attacker-controlled infrastructure and retrieves multi-stage payloads, ultimately installing a remote access trojan (RAT) on target machines.


This attack pattern—staged payload delivery via benign-looking dependencies—represents a deliberate sophistication. By pulling malicious code from external command-and-control servers only after installation, the attack evades static analysis and reduces the likelihood that security researchers would detect the threat during routine npm registry scans.


The affected command-and-control infrastructure routes through domains under the Sfrclak[.]com namespace, which CISA is actively monitoring and recommends organizations block at the network perimeter.


## Scale and Impact


Axios ranks among the most essential libraries in modern JavaScript development. The HTTP client powers countless Node.js applications, backend services, and browser-based tools across finance, healthcare, infrastructure, and consumer technology. The two compromised versions were available on npm's public registry long enough to be downloaded by thousands of organizations, many of which may not yet realize they've incorporated poisoned code.


The window of exposure spans a critical timeframe: malicious versions circulated before the broader security community identified the compromise, meaning development teams updating their dependencies during this period without explicit version pinning would have silently pulled the attack into their supply chain.


## Attack Mechanics


The malicious dependency exploit leverages npm's automatic script execution during package installation. When a developer or CI/CD pipeline runs npm install or npm update, npm automatically executes any scripts defined in a package's package.json file—a convenience feature designed to simplify package setup that, in this case, becomes an attack vector.


The attacker registered plain-crypto-js@4.2.1 as a dependency within Axios's package metadata, ensuring it would be automatically installed whenever the compromised Axios versions were deployed. During installation, the malicious package connects to Sfrclak[.]com infrastructure, downloads the next stage of the attack, and executes it with the permissions of the developer or build system running the command.


The sophistication lies in the multi-stage approach: by separating the dropper (the initial malicious npm package) from the payload (the remote access trojan), attackers create additional complexity for detection. Analysts scanning the npm registry see a relatively small, suspicious-looking package. Only when the package executes does the actual compromise logic deploy.


## Immediate Detection and Remediation


Organizations using affected Axios versions should treat this as a critical security incident requiring immediate action:


Detection Priority

  • Search code repositories for any references to Axios versions 1.14.1 or 0.30.4
  • Review CI/CD pipeline logs for npm install or npm update operations that ran during the exposure window
  • Scan all node_modules/ directories and artifact repositories for the presence of plain-crypto-js@4.2.1
  • Query developer machine package caches and dependency lock files

  • Remediation Steps

  • Downgrade to confirmed safe versions: Axios 1.14.0 or 0.30.3
  • Completely remove node_modules/plain-crypto-js/ directories
  • Force a clean reinstall of all npm dependencies
  • Review build artifacts and container images generated during the exposure window—these may contain the trojan

  • ## Credential and Access Review


    Any system that executed the malicious package during installation must be treated as potentially compromised. Organizations should:


  • Rotate all secrets injected into affected CI/CD environments, including version control tokens, API keys, cloud credentials, and npm authentication tokens
  • Revoke SSH keys that may have been accessible to build systems during the compromise
  • Reset developer credentials for machines that ran npm commands with affected versions, particularly accounts with elevated privileges
  • Force reauthentication across all critical platforms where exposed tokens may have been used

  • For CI/CD pipelines using ephemeral job runners, rotate every secret injected into any build that used the compromised versions, treating the entire job's credential scope as potentially exposed.


    ## Behavioral Monitoring and Containment


    Organizations should establish detection rules for suspicious activity following the compromise window:


  • Monitor outbound network connections from development machines and CI/CD environments to Sfrclak[.]com domains and block these connections at the firewall
  • Watch for unexpected child processes spawned during npm operations, particularly shells, reverse shells, or command execution utilities
  • Establish behavioral baselines for normal Axios operation and alert immediately when the library exhibits anomalous behavior: spawning processes, making unexpected network calls, or accessing sensitive files
  • Hunt across endpoints using endpoint detection and response (EDR) tools for signs of RAT installation and command-and-control communication

  • ## Preventing Future Compromise


    CISA recommends a layered defense strategy that addresses npm-specific risks:


    npm Configuration Hardening

  • Set ignore-scripts=true in .npmrc to disable automatic script execution entirely during package installation
  • Implement min-release-age=7 to only install packages published at least seven days prior, creating a quarantine period for vetting new releases

  • Access Control

  • Mandate phishing-resistant multifactor authentication on all developer accounts, with particular emphasis on accounts with npm publish permissions or administrative access to package registries
  • Implement strict code review processes for any changes to dependency manifests

  • Continuous Verification

  • Establish baseline profiles of normal tool behavior and alert when dependencies deviate from expected execution patterns
  • Conduct regular indicator-of-compromise hunting across all affected systems to confirm the trojan has been removed and C2 communication has ceased

  • ## HackWire Analysis


    The Axios compromise illustrates a critical vulnerability in open-source software distribution: the trust asymmetry between library maintainers and end users. Axios is maintained by a dedicated volunteer team with excellent security practices, yet the npm registry's convenience features—automatic script execution, global dependency namespacing—can be weaponized against even vigilant projects.


    The attack succeeds not through a flaw in Axios itself, but through npm's design. Real defense requires moving beyond incident response and toward systemic changes: treating npm packages as untrusted code by default, verifying the integrity of supply chain actors through cryptographic attestation, and building detection directly into build pipelines rather than hoping end users will notice.


    Organizations using JavaScript in any capacity should treat this as a wake-up call to audit their dependency practices. The ease with which an attacker can inject malicious packages into the ecosystem means that better-than-industry-default security practices—locked versions, signature verification, isolated build environments, and aggressive monitoring—are no longer optional for any team handling sensitive data or infrastructure.