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.jsandcompile.bat. - The code runs in Windows environments and steals credentials.
- Rapid7 lists
sdd.dllas 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.jsandcompile.batinside the rc package folder.sdd.dllon the machine.- A
preinstallscript in thepackage.jsonof 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
- Pin rc to 1.2.8 or earlier and coa to 2.0.2. Reinstall from a clean cache.
- If a machine installed an affected version, treat it as fully compromised. Rotate every credential from a clean computer.
- Delete
compile.js,compile.batandsdd.dll. Plan a full rebuild of the machine. - Check CI runners and build servers that ran
npm installin 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.
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
Send this page to the person who looks after AI at your company.