event-stream by Dominic Tarr
Tools for building pipelines of Node.js streams: map, split, join and merge streams of events. New Zealand programmer Dominic Tarr published it in August 2011, one of the many small modules he wrote.
Real, or AI slop?
The story
event-stream is a JavaScript toolkit for working with streams of data, written by the prolific developer Dominic Tarr. It was downloaded around two million times a week.
In 2018 Tarr, who no longer used the package, handed it over to a stranger who offered to maintain it. The new maintainer added a dependency, flatmap-stream, containing hidden, encrypted code. It only activated inside one particular app, the Copay bitcoin wallet, where it tried to steal users’ wallet keys.
Someone noticed odd code and raised the alarm, and the malicious package was removed. The attack showed how a popular package can be turned into a weapon simply by asking for the keys, and it’s still a textbook example of a software supply-chain attack.
Good to know
- Attackers target popular packages because a single change reaches thousands of projects.
- Tarr said he had given it away because maintaining it brought him nothing.
- Package managers have since added tools to flag suspicious changes and ownership transfers.
Background written with Claude (Opus 5.5) from public sources.