Axios Supply Chain Attack Exposes Developers to Hidden Malware
嗯,用户让我总结一下这篇文章的内容,控制在一百个字以内,而且不需要用“文章内容总结”之类的开头。首先,我得通读整篇文章,抓住主要信息。 文章讲的是2026年3月31日发生的Axios供应链攻击事件。攻击者利用被黑的npm账户发布了两个恶意版本的Axios库,植入了远程访问木马(RAT)。他们通过注入一个未使用的依赖包来执行恶意代码,并且在攻击后删除了痕迹,使得检测困难。 接下来,我需要把这些信息浓缩到100字以内。要包括事件的时间、攻击手段、恶意版本、植入的木马、依赖包的注入以及攻击后的清除行为。 可能的结构是:时间、攻击者如何行动、植入了什么、如何隐藏以及影响范围。这样既全面又简洁。 最后,检查字数是否符合要求,并确保没有使用禁止的开头语句。 </think> 2026年3月31日,Axios供应链攻击事件曝光。攻击者利用被黑的npm账户发布恶意版本(1.14.1和0.30.4),植入远程访问木马(RAT)。通过注入未使用的依赖包[email protected]触发恶意代码,并删除自身痕迹以隐藏攻击行为。 2026-3-31 08:19:3 Author: thecyberexpress.com(查看原文) 阅读量:12 收藏

The Axios supply chain attack that surfaced on March 31, 2026, has raised serious concerns across the JavaScript ecosystem, exposing how a compromised npm Account can be leveraged to distribute malware at scale. The incident involved poisoned releases of the widely used HTTP client library Axios, where attackers exploited a hijacked Axios maintainer account to silently introduce a cross-platform remote access trojan (RAT). 

Security researchers have identified two malicious versions of Axios, 1.14.1 and 0.30.4, published to npm. These releases did not go through the project’s standard GitHub Actions CI/CD pipeline. Instead, they were manually pushed using stolen credentials from a trusted npm Account belonging to a core Axios maintainer. 

The attacker altered the account’s registered email to a ProtonMail address and used the npm CLI to publish the compromised packages. This bypassed the cryptographic protection typically enforced by trusted publishing workflows, making the malicious releases appear legitimate at first glance. 

Hidden Dependency and Malware Deployment 

Notably, the malicious code was not embedded directly within Axios itself. Instead, the attacker injected a fake dependency: [email protected]. This package was never referenced in the Axios source code. Its sole purpose was to execute a post-install script that deployed a RAT. 

Once installed, the dependency triggered a script (node setup.js) that contacted a live command-and-control (C2) server at http://sfrclak.com:8000/6202033. The malware then delivered platform-specific payloads targeting macOS, Windows, and Linux systems. 

After execution, the malicious package removed traces of itself. It deleted its own package.json file and replaced it with a clean decoy version, effectively concealing evidence of compromise during post-installation inspection. 

report-ad-banner

Timeline of the Axios Supply Chain Attack 

The Axios supply chain attack was carefully staged over approximately 18 hours: 

  • March 30, 2026 – 05:57 UTC: A clean version of [email protected] was published to establish credibility.  
  • March 30, 2026 – 23:59 UTC: The malicious version 4.2.1 was released, introducing the RAT dropper.  
  • March 31, 2026 – 00:21 UTC: [email protected] was published using the compromised npm Account.  
  • March 31, 2026 – 01:00 UTC: [email protected] followed, targeting legacy users.  
  • ~03:15 UTC: Both malicious Axios versions were removed from npm.  
  • 03:25 UTC: npm placed a security hold on plain-crypto-js.  
  • 04:26 UTC: A security placeholder package replaced the malicious dependency.  

The poisoned Axios versions remained available for nearly three hours, while the malicious dependency was live for over four hours. 

How the Attack Worked 

The attacker gained access to a primary Axios maintainer account and used it to publish new versions directly to npm. Unlike legitimate releases, which are tied to GitHub Actions using OIDC authentication, these malicious versions lacked any trusted publisher metadata or corresponding Git commits. 

This discrepancy became a key forensic indicator. Legitimate releases showed automated publishing records, while the compromised versions appeared as manually uploaded artifacts. 

Dependency Injection Strategy 

The attacker inserted plain-crypto-js@^4.2.1 into Axios’s dependency list. This change was subtle; every other dependency remained identical to the previous clean versions. 

Because npm automatically installs dependencies, the malicious package executed without requiring any direct interaction from developers. A simple npm install [email protected] was enough to trigger the attack. 

A review of the Axios codebase confirmed that the injected dependency was never used, making it a “phantom dependency”, a strong indicator of tampering. 

Cross-Platform RAT Behavior 

The malware deployed different payloads depending on the operating system: 

  • macOS: Used AppleScript to download and execute a binary stored in /Library/Caches, disguised to resemble a legitimate system process.  
  • Windows: Leveraged VBScript and PowerShell to download and execute a RAT, while disguising persistence mechanisms as system binaries.  
  • Linux: Downloaded a Python script (/tmp/ld.py) and executed it in the background using nohup 

Each variant communicated with the same C2 server but used different identifiers to receive tailored payloads. The traffic was designed to resemble legitimate npm registry activity, helping it evade detection. 

Anti-Forensics and Stealth 

A defining feature of the Axios supply chain attack was its emphasis on evasion. The dropper used layered obfuscation techniques, including XOR encoding and base64 transformations, to hide its logic. 

After execution, it erased itself and replaced its configuration files with clean versions. This meant that developers inspecting their node_modules directory after installation would find no obvious signs of compromise. 

Runtime analysis revealed a 36-second gap between the initial installation and the cleanup process, just enough time for the malware to establish persistence. 

Impact and Response 

Axios is one of the most widely used HTTP libraries in the JavaScript ecosystem, with over 300 million weekly downloads. This made the attack particularly dangerous, as even a short-lived malicious release could impact thousands of projects. 

Developers who installed [email protected] or [email protected] are advised to treat their systems as fully compromised. Safe versions include 1.14.0 and 0.30.3. 

Recommended actions include: 

  • Rotating all credentials, including API keys and tokens  
  • Reviewing network logs for suspicious outbound connections  
  • Rebuilding affected systems entirely rather than attempting partial cleanup  
  • Reinstalling dependencies with scripts disabled  

文章来源: https://thecyberexpress.com/axios-supply-chain-attack-npm-malware/
如有侵权请联系:admin#unsafe.sh