←back to thread

441 points longcat | 2 comments | | HN request time: 0s | source
Show context
nicoritschel ◴[] No.45041302[source]
One of my projects uses an impacted version. However, we use bun as a package manager. Thrilled bun protected us by default!

> executing arbitrary scripts represents a potential security risk, so—unlike other npm clients—Bun does not execute arbitrary lifecycle scripts by default.

replies(1): >>45041417 #
1. ec109685 ◴[] No.45041417[source]
Can’t the exploit just be encoded in files that are used when the npm module is actually used?

It seems like not running it at package install time doesn’t afford that much protection.

replies(1): >>45041533 #
2. bapak ◴[] No.45041533[source]
Correct. Pretty limited as a protection when the first thing you do after installing a package is running it.

Literally the only thing blocking scripts protects you from is if a package is bundled by webpack and not run by node. If the compromise happens in nx, it's just run after up type nx[enter] in your command line.