npm

The rc npm Supply Chain Attack

Updated 5 Oct 2026 · Incident date 4 Nov 2021

rc 1.2.9, 1.3.9 and 2.3.9 on npm ran a hidden downloader that pulled in a password-stealing program in November 2021.

GitHub rates the advisory as critical. The same week, attackers hijacked the coa package with identical malware.

What happened

Attackers published three poisoned versions of rc, a library that reads configuration files.

  • The versions added an install hook in package.json.
  • The hook ran new files named compile.js and compile.bat.
  • The code runs in Windows environments and steals credentials.
  • Rapid7 lists sdd.dll as a file to look for.

The advisory date is 4 November 2021. Rapid7 reports that coa 2.0.3 and later was hijacked on 4 November and that rc was confirmed on 5 November.

Affected versions

  • rc 1.2.9, 1.3.9 and 2.3.9 are malicious.
  • rc 1.2.8 and earlier is safe.
  • coa 2.0.3 and later is also compromised. 2.0.2 is safe.

Indicators of compromise

  • compile.js and compile.bat inside the rc package folder.
  • sdd.dll on the machine.
  • A preinstall script in the package.json of rc at 1.2.9, 1.3.9, or 2.3.9.

How to check

List every copy of rc in the dependency tree, including nested copies.

npm ls rc --all

Then look for the files the malware added.

find . -path '*node_modules/rc/*' ( -name compile.js -o -name compile.bat ) -print
find / -name sdd.dll 2>/dev/null

On Windows, search for sdd.dll with File Explorer or dir /s sdd.dll.

What to do now

  1. Pin rc to 1.2.8 or earlier and coa to 2.0.2. Reinstall from a clean cache.
  2. If a machine installed an affected version, treat it as fully compromised. Rotate every credential from a clean computer.
  3. Delete compile.js, compile.bat and sdd.dll. Plan a full rebuild of the machine.
  4. Check CI runners and build servers that ran npm install in the period.

What Vigilance would show

These examples show an install hold and the corresponding owner report.

Example install message

Vigilance blocked `rc` 1.2.9. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

rc 1.2.9

Installing this settings library now launched a hidden downloader that pulled a password-stealing program onto the machine.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

Which rc versions are malicious?

Versions 1.2.9, 1.3.9 and 2.3.9. The advisory recommends 1.2.8 or earlier.

Is removing the package enough?

No. GitHub says to treat the computer as fully compromised and rotate all credentials from a clean machine.

Sources

  1. github.com/advisories/GHSA-g2q5-5433-rhrf
  2. rapid7.com/blog/post/2021/11/05/new-npm-library-hijacks-coa-and-rc/

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 attacks in the library · npm supply chain attacks · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library