Compromised Axios Library Leads to RAT Deployment via @usebruno/cli
Compromised versions of the `axios` npm package introduced a hidden dependency deploying a cross-platform Remote Access Trojan (RAT), impacting users of `@usebruno/cli` who ran `npm install` between 00:21 UTC and ~03:30 UTC on March 31, 2026, potentially leading to credential exfiltration.
On March 31, 2026, a supply chain attack targeted the axios npm package, a widely used HTTP client library for JavaScript. Compromised versions 1.14.1 and 0.30.4 of the library were injected with malicious code that installed a cross-platform Remote Access Trojan (RAT) on systems that installed the affected versions of @usebruno/cli. This attack specifically impacted users of the @usebruno/cli who performed an npm install within a roughly 3-hour window, between 00:21 UTC and 03:30 UTC. The malicious code was designed to execute during the postinstall phase of the package installation, indicating a targeted effort to compromise developer environments. This incident highlights the increasing risk of supply chain attacks targeting open-source software and the importance of verifying the integrity of third-party dependencies.
Attack Chain
- Attacker compromises the
axiosnpm package, injecting malicious code into versions 1.14.1 and 0.30.4. - The compromised
axiospackage is published to the npm registry. - A user of
@usebruno/cliexecutesnpm installwithin the attack window (00:21 UTC - 03:30 UTC on March 31, 2026). - The npm package manager resolves the dependency chain and downloads the compromised
axiospackage as a dependency of@usebruno/cli. - The malicious code within the
axiospackage executes during thepostinstallscript phase of the installation process. - The
postinstallscript downloads and installs a cross-platform Remote Access Trojan (RAT) on the user’s system. - The RAT establishes a connection to a remote command-and-control (C2) server.
- The attacker uses the RAT to exfiltrate credentials and other sensitive data from the compromised system.
Impact
This supply chain attack could have resulted in widespread compromise of developer systems that used the @usebruno/cli. While the number of affected users is unknown, the incident could have led to the exfiltration of sensitive credentials and proprietary source code, potentially enabling further attacks against the affected organizations and their customers. The incident underscores the need for robust security measures in software development pipelines and continuous monitoring of third-party dependencies for malicious activity.
Recommendation
- If
@usebruno/cliwas installed during the affected window, reinstall dependencies to ensure a clean version ofaxiosis used (reference: Impact section). - Rotate all credentials and secrets that were present on systems where
@usebruno/cliwas installed during the affected window (reference: Impact section). - Review and implement the security guidance provided in the Aikido Security blog post to further harden your systems (reference: https://www.aikido.dev/blog/axios-npm-compromised-maintainer-hijacked-rat).
- Monitor process creation events for unusual processes spawned by npm or node processes, using the provided Sigma rule (reference: Sigma rule - “Detect Suspicious Process Spawned by NPM”).
Detection coverage 2
Detect Suspicious Process Spawned by NPM
highDetects suspicious processes spawned by npm or node, which could indicate malicious activity during package installation.
Detect Outbound Network Connection from postinstall Script
mediumDetects network connections initiated from a process spawned during the postinstall phase, which could indicate a RAT calling home.
Detection queries are kept inside the platform. Get full rules →
Indicators of compromise
1
url
| Type | Value |
|---|---|
| url | https://www.aikido.dev/blog/axios-npm-compromised-maintainer-hijacked-rat |