
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
By default, node throws EPIPE errors if process.stdout is being written to and
a user runs it through a pipe that gets closed while the process is still outputting
(eg, the simple case of piping a node app through head).
This seemed a little overzealous to me, so I wrote this to suppress such errors.
;(function log() {
console.log('tick')
process.nextTick(log)
})()
$ node example.js | head
tick
tick
tick
tick
tick
tick
tick
tick
tick
tick
events.js:66
throw arguments[1]; // Unhandled 'error' event
^
Error: write EPIPE
at errnoException (net.js:782:11)
at Object.afterWrite (net.js:600:19)
require('epipebomb')()
;(function log() {
console.log('tick')
process.nextTick(log)
})()
$ node example.js | head
tick
tick
tick
tick
tick
tick
tick
tick
tick
tick
Require epipebomb/register from the command line
node -r epipebomb/register some-script.js | head
or use epipebomb as a drop-in replacement for node
epipebomb some-script.js | head
Only the EPIPE error is captured on process.stdout - all other errors are thrown as per usual.
FAQs
Destroy EPIPE errors when stdout runs through a truncated pipe
The npm package epipebomb receives a total of 11,148 weekly downloads. As such, epipebomb popularity was classified as popular.
We found that epipebomb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.