Protestware: How Ideologically Motivated Attackers Compromise Open Source Code and Supply Chains

Protestware represents a growing supply chain risk where open source maintainers deliberately insert destructive or politically motivated code into widely used packages. Unlike traditional malware seeking financial gain, protestware is driven by ideological motives and can delete files, cause denial of service, or restrict functionality based on geography or locale. Notable incidents include the node-ipc and peacenotwar packages that overwrote files on systems in Russia and Belarus, the colors.js infinite loop causing DoS, and es5-ext triggering high CPU usage during specific hours or Russian locales. These attacks often hide in postinstall hooks, use geolocation checks via ipinfo.io, or activate via environment variables and timestamps. Detection requires static analysis for geo-IP logic, dynamic monitoring in sandboxes, and tools such as Software Bill of Materials and OpenSSF Scorecard. Organizations are advised to adopt Zero Trust for dependencies, pin versions, use internal artifact repositories, and follow frameworks including NIST SSDF and SLSA to mitigate risks.

HabrTranslated from Russian

Read at source

Protestware has emerged as a serious supply chain threat in open source ecosystems, where maintainers intentionally embed destructive or politically motivated code into libraries and packages.

Unlike conventional malware aimed at financial profit, protestware is driven by ideological, social, or political motives. It can delete or corrupt data, sabotage business processes, restrict users from specific regions, or spread unauthorized messages.

The risk is comparable to traditional vulnerabilities, repository compromises, and Dependency Confusion attacks because the malicious code often arrives through normal dependency updates.

Known Incidents

One prominent case involved the packages node-ipc and peacenotwar. The node-ipc library added peacenotwar as a dependency; the module checked the user’s IP via geolocation services and, if located in Russia or Belarus, replaced files on disk with heart symbols while creating a WITH-LOVE-FROM-AMERICA.txt file on the desktop.

Another incident affected the popular colors.js library. An infinite loop printing non-ASCII characters was introduced, causing denial of service for any CLI or server application that required the package.

The es5-ext package, used by webpack, contained logic that triggered 100% CPU usage in an infinite loop if the system time was between 22:00 and 06:00 or the locale was set to ru_RU.

Placement and Triggers

Malicious logic can reside in runtime code, npm lifecycle hooks, build scripts, test scripts, or package metadata that fetches instructions from remote servers. Activation conditions include IP geolocation, system locale, environment variables such as NODE_ENV, hostname, username, and specific dates or times.

Detection and Mitigation

Organizations can detect suspicious components through static analysis for geo-IP or file-deletion patterns, dynamic analysis in isolated sandboxes, and continuous monitoring of repository changes. Recommended controls include pinning dependency versions, maintaining an internal artifact repository with approval gates, signing artifacts, and following the NIST Secure Software Development Framework, SLSA levels, and OpenSSF Scorecard assessments.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Supply Chain & Open Source

Passwordless Kubernetes Image Pulling with Artifact Keeper via ServiceAccount Tokens
Malicious Code Injected into LiteLLM Open Source AI Package via Supply Chain Attack
GhostAction Campaign Compromises 790 GitHub Repositories via Malicious Workflows