Axios Hijacked: npm Account Takeover Deploys Cross-Platform RAT to Millions
嗯,用户让我用中文帮他总结一下这篇文章的内容,控制在一百个字以内,而且不需要用“文章内容总结”或者“这篇文章”这样的开头,直接写描述。好的,我先仔细看看文章内容。 文章讲的是Axios这个JavaScript HTTP客户端被攻击了。攻击者 hijack 了主要维护者的npm账号,发布了两个恶意版本:1.14.1和0.30.4。这两个版本注入了一个隐藏的依赖项plain-crypto-js,这个依赖项会安装一个跨平台的远程访问木马(RAT),影响macOS、Windows和Linux系统。攻击者在发布后大约三小时就被npm移除了。 接下来,文章详细描述了攻击的过程:攻击者获取了维护者的npm令牌,更改了邮箱并锁定了合法账户,然后直接通过npm CLI发布了中毒包,绕过了项目的CI/CD和OIDC控制。恶意包引入了一个隐藏的依赖项,该依赖项在安装时触发了一个后门脚本,下载并执行特定于操作系统的RAT。此外,恶意软件在执行后会删除自身和恶意文件,使得事后检测变得困难。 受影响的组织应该立即降级到安全版本,并调查系统中是否存在RAT痕迹,同时轮换所有可能被泄露的凭证。 总结一下关键点:Axios被攻击、发布了恶意版本、引入隐藏依赖、部署跨平台RAT、删除证据、建议降级和调查。 现在要控制在100字以内,并且直接描述内容。需要涵盖主要事件:Axios npm账号被劫持、发布恶意版本、注入隐藏依赖导致RAT感染多平台、持续时间短等。 可能的总结:“Axios npm账号被劫持发布恶意版本1.14.1和0.30.4,注入隐藏依赖plain-crypto-js,在macOS、Windows和Linux部署跨平台远程访问木马。恶意包存活约三小时后被移除。” 这样刚好在100字以内,并且涵盖了主要事件。 </think> Axios npm账号被劫持发布恶意版本1.14.1和0.30.4,注入隐藏依赖plain-crypto-js,在macOS、Windows和Linux部署跨平台远程访问木马。恶意包存活约三小时后被移除。 2026-3-31 16:10:12 Author: securityboulevard.com(查看原文) 阅读量:4 收藏

On March 31, 2026, two malicious versions of Axios – the JavaScript HTTP client with over 83 million weekly downloads – were published to npm after an attacker hijacked the lead maintainer’s account. Versions 1.14.1 and 0.30.4 injected a phantom dependency that silently installs a cross-platform remote access trojan on macOS, Windows, and Linux. The malicious versions were live for roughly three hours before npm removed them.

If your lockfile contains either affected version, assume your development machine or CI runner has been compromised.

TL;DR

  • A compromised npm access token was used to publish malicious Axios versions 1.14.1 and 0.30.4, bypassing all CI/CD and OIDC provenance controls
  • Both versions introduce a hidden dependency (plain-crypto-js) that deploys a persistent, cross-platform remote access trojan targeting macOS, Windows, and Linux
  • The payload erases all forensic traces within seconds of execution, rendering post-install inspection ineffective
  • Affected organizations should downgrade immediately, investigate systems for RAT artifacts, and rotate all credentials accessible from compromised environments

What happened?

The attacker obtained a long-lived classic npm access token belonging to jasonsaayman, the lead maintainer of Axios. They changed the account’s email to an attacker-controlled ProtonMail address, locking the legitimate owner out of recovery, and published poisoned packages directly via the npm CLI – bypassing the project’s normal GitHub Actions OIDC Trusted Publisher workflow.

Eighteen hours earlier, a separate attacker account (nrwise) had published a clean decoy package called [email protected] to build publishing history. The malicious [email protected] went live at 23:59 UTC on 30 Mar 2026, and within the next hour both [email protected] and [email protected] were published with it injected as a runtime dependency – hitting both active release branches. The compromised maintainer’s permissions exceeded those of the other collaborators, hampering initial response.

How did the payload work?

The only change in both malicious Axios versions was a single new dependency: "plain-crypto-js": "^4.2.1". This package is never imported in the Axios source – it exists solely to run a postinstall hook that triggers an obfuscated dropper script. The dropper detects the OS and fetches a platform-specific RAT from the C2 server (sfrclak[.]com:8000):

  • macOS: Downloads a C++ binary to /Library/Caches/com.apple.act.mond (mimicking Apple’s naming). The RAT fingerprints the system, beacons every 60 seconds, and supports remote commands including binary execution, shell commands, and filesystem enumeration.
  • Windows: Copies PowerShell to %PROGRAMDATA%\wt.exe (disguised as Windows Terminal), downloads and executes a hidden .ps1 script via a VBScript wrapper.
  • Linux: Downloads a Python RAT to /tmp/ld.py and launches it in the background.

After launching the payload, the dropper erases all evidence – deleting itself, removing the malicious package.json, and swapping in a pre-staged clean manifest. The first C2 connection fires 1.1 seconds into npm install.

Which versions are affected?

Component

Affected Versions

SHA-256

Exposure Window

Safe Versions

axios (npm)

1.14.1

5bb67e88846096f1f8d42a0f0350c9c46260591567612ff9af46f98d1b7571cd

~2h 54m (31 Mar 2026, 00:21–03:15 UTC)

1.14.0

axios (npm)

0.30.4

59336a964f110c25c112bcc5adca7090296b54ab33fa95c0744b94f8a0d80c0f

~2h 15m (31 Mar 2026, 01:00–03:15 UTC)

0.30.3

plain-crypto-js (npm)

4.2.1

58401c195fe0a6204b42f5f90995ece5fab74ce7c69c67a24c61a057325af668

~4h 27m (30 Mar 2026 23:59–31 Mar 2026 04:26 UTC)

None – should not exist in your dependencies

No CVE was assigned – this is a supply chain compromise, not a code vulnerability. The malicious dependency is tracked as GHSA-2x9r-6wxq-hrr7 and classified as malware.

What should your team do now?

Check your lockfiles for [email protected] or [email protected]. Search for node_modules/plain-crypto-js/ – this directory should not exist in any legitimate project. Downgrade immediately to [email protected] or [email protected]

If the affected version was installed on any machine or CI runner, search for RAT artifacts: /Library/Caches/com.apple.act.mond (macOS), %PROGRAMDATA%\wt.exe (Windows), /tmp/ld.py (Linux). If found, treat the system as fully compromised – rebuild from a clean state and rotate every accessible credential. Block sfrclak[.]com and 142.11.206.73 at the network level.

Or, skip the manual work – we’ve open-sourced ready-to-run remediation playbooks for this and other supply chain incidents. Drop them into your AI coding assistant and get answers in minutes.

Indicators of compromise

Indicator

Details

Malicious packages

[email protected], [email protected], [email protected]

C2

sfrclak[.]com / 142.11.206.73 (port 8000)

macOS artifact

/Library/Caches/com.apple.act.mond

Windows artifacts

%PROGRAMDATA%\wt.exe, %TEMP%\6202033.vbs, %TEMP%\6202033.ps1

Linux artifact

/tmp/ld.py

Phantom dependency

node_modules/plain-crypto-js/ directory present

Attacker account

nrwise (npm, [email protected])

Compromised account

jasonsaayman (npm, email changed to [email protected])

Full SHA-256 hashes are listed in the affected versions table above.

Payload hashes

These are the RAT files fetched from the C2 server during installation – not present in the npm registry. Use them to verify suspected files found on compromised machines.

File

Platform

SHA-256

`setup.js`

All (dropper)

`e10b1fa84f1d6481625f741b69892780140d4e0e7769e7491e5f4d894c2e0e09`

`com.apple.act.mond`

macOS

`92ff08773995ebc8d55ec4b8e1a225d0d1e51efa4ef88b8849d0071230c9645a`

`stage2.ps1`

Windows

`617b67a8e1210e4fc87c92d1d1da45a2f311c08d26e89b12307cf583c900d101`

`ld.py`

Linux

`fcb81618bb15edfdedfb638b4c08a2af9cac9ecfa551af135a8402bf980375cf`

Key takeaways

A single long-lived token is a single point of failure. One stolen classic npm token – no IP restriction, no expiration, no OIDC binding – was enough to poison a package used by millions.

Postinstall hooks are an open door. The entire attack chain completes in 1.1 seconds via a postinstall hook on a transitive dependency. Enforce --ignore-scripts in CI/CD.

Self-destructing malware defeats post-hoc auditing. This payload erases itself within seconds. Runtime detection during install is the only way to catch it.

Have you checked your lockfiles? We’d like to hear how your team is responding.

*** This is a Security Bloggers Network syndicated blog from Legit Security Blog authored by Omer Guetta. Read the original post at: https://www.legitsecurity.com/blog/axios-hijacked-npm-account-takeover-deploys-cross-platform-rat-to-millions


文章来源: https://securityboulevard.com/2026/03/axios-hijacked-npm-account-takeover-deploys-cross-platform-rat-to-millions/
如有侵权请联系:admin#unsafe.sh