The clamp4js package uses its install script to fetch Windows installers and signal a link shortener.
Installing this clamp helper runs a hidden download in your shell. Computers and CI runners that installed any affected version were exposed.
What happened
The package is a one-function clamp helper, but its install script fetches and stores two Windows installers and calls out to a shortener. None of that has anything to do with clamping a number.
- The postinstall script races downloads of Microsoft Edge and Google Chrome installers from their vendor addresses.
- It writes the first response into a random-named file in the system temp folder.
- It then fetches
https://urlto.me/2rrih, a fixed beacon. - The script hides its addresses: it splits them into joined strings and passes them through a decode function built on two number tables.
- Version 1.0.9 emptied the script and version 1.0.13 turned it back on with the beacon.
Vigilance caught version 1.0.9 at 20:39 UTC on 25 November 2026, 1 minute 9 seconds after it appeared on npm. The first affected version, 1.0.5, appeared 5 minutes 37 seconds before the catch.
Affected versions
1.0.5added the postinstall downloader (setup.js).1.0.9renamed it toinstall.jsand left it dormant.1.0.13turned the download back on and added the beacon.- Versions
0.0.0-stageand1.0.2had an empty install script.
Indicators of compromise
- A
postinstallscript that runsnode install.js(ornode setup.jsin1.0.5). - Requests to
c2rsetup.officeapps.live.com/c2r/downloadEdge.aspxanddl.google.com/installers/ChromeSetup.exefrom an npm install. - Requests to
https://urlto.me/2rrihin1.0.13.
How to check
Run this outside the project, and check which version your lockfile records.
npm ls clamp4js
Check your CI build logs and lockfile history for versions 1.0.5 through 1.0.13. A clean install today cannot rule out earlier exposure.
What to do now
- Remove clamp4js, or pin a clean version such as
1.0.2. - Check the temp folder of any machine that installed an affected version for unknown files.
- Review network logs for requests to the addresses above from build machines.
What Vigilance would show
These examples show an install hold and the corresponding owner report.
Example install message
Vigilance blocked `clamp4js` 1.0.9. This version is too new or changed in a way Vigilance must check first.
Example owner report
Bad update
clamp4js 1.0.9
The install script downloads Windows installers into a random temp file and beacons a link shortener.
No security team? See who reads the alert.
Frequently asked questions
What does clamp4js do?
Its published code clamps a number between two values. Its install script does something else entirely: it downloads Windows installers and beacons a link shortener.
Did the install script run the downloaded files?
In version 1.0.13 the script loads the child process module but does not call it, so the installers are dropped, not run. Treat any machine that installed an affected version as exposed.
Sources
Send this page to the person who looks after AI at your company.