load-from-cwd-or-npm 3.0.2 and rate-map 1.0.3 on npm made the PureScript installer hang instead of finishing, in July 2019.
Both packages belonged to a former author of the installer. The code did not steal data.
What happened
The PureScript installer downloads a prebuilt compiler. Its maintainers took over from the original author, Shinnosuke Watanabe (@shinnn), after a disagreement.
load-from-cwd-or-npm@3.0.2returned a PassThrough stream instead of the expected package.- The installer then hung at the step that checks for a prebuilt binary.
rate-map@1.0.3removed callback behavior and then deleted itself.- The code ran only when the PureScript installer used it.
Version 3.0.2 went up on 5 July 2019 at about 21:00 UTC. A user found the problem on 9 July at about 01:00 UTC. Clean 3.0.4 followed at about 05:00 UTC.
Affected versions
load-from-cwd-or-npm3.0.2. Clean 3.0.4 followed.rate-map1.0.3.- The PureScript npm installer before the fix, which depended on these packages.
- The registry removed both malicious versions. PureScript 0.13.2 or later is fixed.
Indicators of compromise
load-from-cwd-or-npmversion 3.0.2 in a lockfile ornode_modules.rate-mapversion 1.0.3 in a lockfile ornode_modules.- An install of
purescriptthat hangs at the message "Check if a prebuilt binary is provided for your platform".
How to check
List the two packages in your dependency tree.
npm ls load-from-cwd-or-npm rate-map
Search lockfiles for the bad versions.
grep -rnE "load-from-cwd-or-npm|rate-map" package-lock.json yarn.lock 2>/dev/null
What to do now
- Update
purescriptto 0.13.2 or later. - Remove or update
load-from-cwd-or-npmandrate-mapso that no bad version remains. - Reinstall dependencies from a clean lockfile.
What Vigilance would show
These examples show an install hold and the corresponding owner report.
Example install message
Vigilance blocked `load-from-cwd-or-npm` 3.0.2. This version is too new or changed in a way Vigilance must check first.
Example owner report
Bad update
load-from-cwd-or-npm 3.0.2
One helper can now overwrite other packages' files on disk, quietly breaking a rival project's download step.
No security team? See who reads the alert.
Frequently asked questions
What did the malicious packages do?
They made the PureScript installer hang during the prebuilt binary check. The sources do not describe data theft.
Which versions were malicious?
load-from-cwd-or-npm 3.0.2 and rate-map 1.0.3.
Sources
Send this page to the person who looks after AI at your company.