Eleven lines unpublished, thousands of builds broken
Large-scale supply chain: failure, no attacker22 March 2016
A developer in a naming dispute unpublished all 273 of his npm packages, including an eleven-line string-padding function that much of the JavaScript ecosystem depended on without knowing it. Builds failed across thousands of projects for about two and a half hours.
- Position
- A tiny package deep in the dependency tree
- Reach
- About 2.5 million downloads in the previous month; builds of Babel, React and thousands of other projects
What happened
After npm transferred a package name to a company in a trademark dispute, developer Azer Koçulu unpublished all 273 of his packages on 22 March 2016. One of them was left-pad, eleven lines that pad a string with spaces, which tools such as Babel depended on through other packages. Builds and installs that needed it began failing across many thousands of projects. Another developer republished an identical package within minutes, and npm restored the original from backup, ending about two and a half hours of disruption. npm then made unpublishing harder when other packages depend on a version.
The ATG nexus
Nobody attacked anything. One person's decision about his own code broke the build of a large part of the web's software, because so much of it rested on code nobody had reviewed or even noticed. The failure measured something an attacker could use: the distance between what developers think they depend on and what they actually run.
Limits of the comparison
The code was removed, not altered, so the failure announced itself at once. It broke builds and installs, not running sites or anyone's screen.
On this site
- Whitepaper, Chapter 9: Open Source and the Path to the Client Runtime
- Introduction: A Supply Chain Nobody Sees
- Concept: The Open-Source Open Door
- Concept: The Cost of Free
- Concept: The Digital Supernode