event-stream is handed to a stranger who targets one wallet
ATG-class event9 September to 26 November 2018
The maintainer of a popular npm package handed publishing rights to a volunteer, who added a dependency whose hidden payload activated only inside the build of one cryptocurrency wallet app.
- Position
- Maintainership of a package with more than 1.5 million weekly downloads
- Reach
- Millions of installs; the payload targeted Copay wallet releases 5.0.2 to 5.1.0
- Category
- Open-Source Maintainer Infiltration
What happened
event-stream was a widely used npm package with more than 1.5 million weekly downloads. Its original author, no longer working on it, handed publishing rights to a user who had offered to help. On 9 September 2018 the new maintainer released a version that added a dependency, flatmap-stream. Its encrypted payload stayed inert everywhere except inside the build environment of Copay, a cryptocurrency wallet, where it injected code into Copay's release builds to steal keys from wallets holding large balances. Copay confirmed that versions 5.0.2 through 5.1.0 shipped the code.
A user reported it on GitHub on 20 November, more than two months after release. npm removed the malicious versions and took over the package on 26 November.
The ATG nexus
No account was hacked. Trust was handed over in good faith, through the ordinary way open source changes hands, and the new holder used it. The payload was aimed: millions of installs carried it, and it acted in one place. That combination, a legitimate transfer and a narrowly targeted payload, is what the confirmed record means by maintainer infiltration, and why it lists event-stream among its confirmed cases.
Limits of the comparison
The target was a wallet application's build, so the harm was theft through the shipped app. No amount stolen was established in the public record.
On this site
- Whitepaper, Chapter 9: Open Source and the Path to the Client Runtime
- Whitepaper, Chapter 13: The Confirmed Historical Record
- Introduction: Many Ways In, and Most Are Not Hacking
- Concept: The Open-Source Open Door
- Concept: The Silent Transfer
- Concept: The Cost of Free
- Concept: Lying in Wait