Your Application Could Be Compromised If You Use This npm Package

A simple breakdown of the Axios supply chain attack — and what every developer must check right now

Thumbnail

Modern applications rely heavily on open-source libraries. One such popular tool is Axios, widely used for handling API requests. But a recent security incident has shown how even trusted dependencies can turn into a serious risk.

Let’s understand what happened, why it matters, and what actions you should take — explained in a clear and beginner-friendly way.

What is Axios and Why Do Developers Use It?

Axios is a promise-based HTTP client used in JavaScript applications. It helps apps communicate with servers without writing complex networking code.

Common use cases include:

  • Fetching data from APIs
  • Sending form submissions
  • Handling backend communication

Axios works in both browsers and Node.js, which makes it a common choice across modern projects.

You Might Be Using It Without Realising

Even if you didn’t install Axios directly, it can still be part of your project through:

  • Frontend frameworks like React, Vue, or Angular
  • Mobile apps built with React Native
  • Desktop apps using Electron
  • Internal tools or SaaS platforms

It works quietly in the background — until something goes wrong.

What Happened in This Attack?

Attackers gained access to the credentials of a key Axios maintainer. Using that access, they published compromised versions of Axios to npm.

Affected Versions:

  • axios@1.14.1
  • axios@0.30.4

These versions included a suspicious dependency:

  • plain-crypto-js@4.2.1

This dependency wasn’t even used in the actual code, which made it highly unusual.

The Hidden Danger: Remote Access Trojan (RAT)

The compromised packages executed a script automatically during installation (npm install). This script downloaded and installed a Remote Access Trojan (RAT).

What Can a RAT Do?

  • Give attackers remote control of your system
  • Steal sensitive data like API keys and tokens
  • Access private repositories or deployment systems
  • Inject malicious code into your applications

👉 Important: This attack happens during installation — not when your app runs.

Why This Is Serious

These Axios versions are downloaded up to 100 million times per week, meaning the potential impact is very large.

Who Is at Risk?

  • Developers installing dependencies
  • CI/CD pipelines
  • Build and deployment environments

If your system installed these versions with scripts enabled, sensitive data may have been exposed.

Who Is Not Directly Affected?

End users of applications are generally safe because:

  • The malicious code does not run in the browser
  • It only executes during the install/build phase

Why It’s Hard to Detect

This attack is particularly dangerous because it hides itself well.

After execution, the malware:

  • Removes its own traces
  • Leaves no suspicious files behind
  • Appears clean in dependency folders

Even tools like npm audit won’t detect it.

Indicators of Compromise (IOCs)

If you suspect exposure, look for these signs:

Suspicious Network Activity

  • Domain: sfrclak[.]com
  • IP: 142.11.206.73

Temporary Files

  • macOS: /Library/Caches/com.apple.act.mond
  • Linux: /tmp/ld.py
  • Windows:
  • %PROGRAMDATA%\wt
  • %TEMP%\6202033.vbs or .ps1

These files may disappear quickly after execution.

Real-World Example

Consider this scenario:

  1. Your project runs npm install in a CI pipeline
  2. It installs a compromised Axios version
  3. A hidden script executes silently
  4. Your environment variables (API keys, secrets) are exposed

This could allow attackers to:

  • Access your cloud systems
  • Modify your codebase
  • Compromise your users

All without obvious signs.

What Should You Do Immediately?

If there’s any chance your system installed the affected versions:

Take Action Now:

  • Treat the system as potentially compromised
  • Rotate all secrets (API keys, tokens, SSH keys)
  • Revoke and regenerate credentials
  • Review recent deployments and access logs

Prevent Future Risks:

  • Lock dependency versions using package-lock.json
  • Avoid blindly installing latest versions
  • Monitor install-time scripts
  • Use secure CI/CD practices

Key Takeaways

  • A supply chain attack targeted Axios, a widely used npm package
  • Malicious versions installed a hidden dependency that executed a RAT
  • The attack occurs during npm install, not during runtime
  • Developers and build systems are the main targets
  • The malware removes traces, making detection difficult
  • Immediate security actions are necessary if affected

👉 If you’re an AI enthusiast like me, you can read more AI-related trending stories here 📚

👉 Follow us not to miss any updates.

👉 Have any suggestions? Let us know in the comments!

👉 Subscribe for free and join our growing community!