Software Supply Chain Weakness: Snyk Warns of ‘Deliberate Sabotage’ of NPM Ecosystem
Software supply chain security fears escalated again this week with the discovery of what’s being described as “deliberate sabotage” of code in the open-source npm package manager ecosystem.
Researchers at cloud security vendor Snyk sounded the alarm late Wednesday that a popular NPM package manager with about 1.1 million weekly downloads had been rigged in an act of protest against the war in Ukraine.
The issue, currently being tracked as CVE-2022-23812, marks “node-ipc” as a malicious package deliberately targeting users in Russia and Belarus.
“This package contains malicious code that targets users with IP located in Russia or Belarus, and overwrites their files with a heart emoji,” Snyk said in a critical advisory that carries a 9.8 out of 10 CVSS score.
“This security incident involves destructive acts of corrupting files on disk by one maintainer and their attempts to hide and restate that deliberate sabotage in different forms. While this is an attack with protest-driven motivations, it highlights a larger issue facing the software supply chain: the transitive dependencies in your code can have a huge impact on your security,” Snyk researcher Liran Tal said in a note documenting the discovery.
Snyk found the malicious code in versions 10.1.1 and 10.1.2 and urged users within the software dependency chain to upgrade node-ipc to version 10.1.3 or higher.
The company published a detailed timeline of the sabotage, noting the npm maintainer originally released a package manager called ‘peacenotwar’ in early May with the following description:
“This code serves as a non-destructive example of why controlling your node modules is important. It also serves as a non-violent protest against Russia’s aggression that threatens the world right now. This module will add a message of peace on your users’ desktops, and it will only do it if it does not already exist just to be polite.”
A week later, the developer then flipped a switch that had immediate security ramifications for the software ecosystem.
“At this point, a very clear abuse and a critical supply chain security incident will occur for any system on which this npm package will be called upon, if that matches a geo-location of either Russia or Belarus,” he added.
The company noted that the maintainer behind the protest sabotage currently maintains more than 40 additional npm package managers “with hundreds of millions of downloads” and warned that it constitutes a “dangerous and malicious act.”
Related: Cyber Insights 2022: Supply Chain