Axios npm compromise traced to targeted social engineering attack

The recent compromise of the widely used Axios npm package has been confirmed as the result of a targeted social engineering attack.

The incident, which briefly exposed developers to malicious code, highlights growing risks within the open-source software supply chain.

On March 31, attackers managed to publish two malicious versions of Axios to npm. These versions introduced a hidden dependency that deployed a remote access trojan (RAT) affecting macOS, Windows, and Linux systems.

Given Axios’s widespread use across JavaScript applications, the potential impact extended far beyond direct users, reaching projects through transitive dependencies embedded deep within development stacks.

Axios maintainer Jason Saayman revealed in GitHub discussions that the breach stemmed from a sophisticated and targeted social engineering campaign.

The attacker reportedly impersonated a legitimate and well-known company, initiating contact under the pretense of collaboration.

Malicious Releases Bypassed Safeguards

The campaign involved multiple stages, including cloned corporate identities, a convincing Slack workspace, and staged meetings designed to build trust.

Ultimately, the attacker convinced Saayman to execute a malicious installation, which granted remote access to his system.

With access to the maintainer’s machine, the attacker was able to hijack active browser sessions, including authentication cookies.

Jason Saayman reports (Source : Socket).
Jason Saayman reports (Source : Socket).

This allowed them to gain full control over both npm and GitHub accounts without needing to bypass security measures such as two-factor authentication (2FA) or OIDC-based protections.

Saayman noted that the attacker had “enough access to hijack from my browser,” effectively operating with the same privileges as the legitimate maintainer.

This allowed them to gain full control over both npm and GitHub accounts without needing to bypass security measures such as two-factor authentication (2FA) or OIDC-based protections.

Saayman described how the attack was carried out (Source : Socket).
Saayman described how the attack was carried out (Source : Socket).

This type of compromise demonstrates a critical weakness in software supply chain security: when attackers gain trusted access, technical safeguards alone may not be sufficient.

In this case, the attack did not exploit a vulnerability in Axios code, but rather the human layer behind it.

Open Source Maintainers Under Pressure

The Axios incident underscores the increasing pressure placed on individual open-source maintainers, many of whom manage critical infrastructure with limited support.

Saayman acknowledged falling victim to a “well-known” social engineering tactic and stated that the attacker likely would have achieved full access regardless of existing protections.

Following the breach, he wiped all devices, rotated credentials, and began implementing stronger safeguards, including hardware security keys and improved publishing workflows.

The attack mirrors broader trends seen in supply chain threats, such as the xz utils backdoor, where adversaries invest time in building trust before executing an attack. In the case of Axios, the trust relationship was exploited directly through the maintainer.

Axios is deeply embedded in the JavaScript ecosystem, often included indirectly in projects without explicit developer awareness. This makes any compromise particularly dangerous, as malicious code can propagate silently across thousands of applications.

Security experts emphasize that open-source maintainers are increasingly high-value targets. Their access can provide attackers with a direct path into the global software supply chain.

The incident serves as a stark reminder that securing open-source ecosystems requires more than technical defenses.

It also demands stronger support systems for maintainers, including better operational security practices, dedicated resources, and recognition of their role as critical infrastructure.

As attacks continue to evolve, the Axios compromise highlights a key reality: when code is trusted at scale, attackers will often target the people behind it.

Related Articles

Back to top button