XORIndex Malware Spread Widens as North Korean Hackers Exploit npm Registry
XORIndex Malware: North Korean Hackers Target npm Registry in Ongoing Supply Chain Attack The open-source community faces a growing challenge: supply chain attacks are no longer rare events but persistent threats. Our latest blog unpacks how North Korean threat actors are exploiting the npm registry with a new malware loader, XORIndex, as part of their broader Contagious Interview campaign. This attack highlights how software dependencies—trusted by developers worldwide—can become backdoors for sophisticated adversaries. The evolving tactics underscore why securing the supply chain is no longer optional.
July 19, 2025

The open-source software ecosystem thrives on community collaboration, but its very openness also exposes it to sophisticated supply chain attacks. Recently, North Korean threat actors associated with the long-running “Contagious Interview” campaign have escalated their efforts by injecting malicious packages into the npm registry, a crucial repository for JavaScript developers worldwide. This wave of attacks has introduced a previously undocumented malware loader dubbed XORIndex, highlighting persistent and evolving risks in software supply chains.
The npm ecosystem is a vital component of the modern web-development landscape. Developers rely on it daily to source reusable code packages, speeding up the creation process. Unfortunately, attackers have recognised npm as an attractive vector for spreading malicious software, often by publishing counterfeit or trojanized packages that unsuspecting developers might download and incorporate into their projects. When compromised dependencies are introduced into production environments, they create hidden backdoors and elaborate attack chains that can steal sensitive information or deploy malware.
The Contagious Interview campaign exemplifies this threat. Conceived to lure software engineers through fake coding assignments or open-source projects, this operation targets already employed developers within organisations of strategic interest, rather than job applicants. The attackers then deploy payloads via these malicious npm packages, which have collectively amassed over 17,000 downloads in recent weeks. Central to this attack campaign’s weaponry is XORIndex, a malware loader that has rapidly evolved from basic iterations into a more stealthy and capable tool.
XORIndex’s role in the attack is pivotal. Much like its predecessor, HexEval, XORIndex initially profiles the infected system, gathering data such as the machine’s configuration and external IP address by communicating with hardcoded command-and-control servers. This reconnaissance step enables attackers to determine the system’s suitability for further exploitation. Subsequently, XORIndex launches BeaverTail—a known JavaScript loader and stealer used to extract data from web browsers and cryptocurrency wallets—and deploys a Python backdoor, dubbed InvisibleFerret, which opens persistent remote access channels.
What makes this campaign particularly challenging for defenders is its “whack-a-mole” dynamic. Researchers promptly detect and remove malicious packages, yet the attackers continuously respond by publishing new versions or variants under different maintainer aliases. This cat-and-mouse cycle highlights the limitations of detection-based defences and underscores the importance of proactive security measures in safeguarding the software supply chain. The threat actors’ adaptability also extends to manipulations of npm download metrics, artificially inflating download figures to lend credibility and disguise their malicious intent.
This ongoing wave of attacks underscores several vital lessons. First, no software supply chain is immune to targeted poisoning attacks, particularly when adversaries are motivated and sophisticated enough to evolve their malware continually. Second, detection capabilities must be coupled with holistic risk management strategies, including strict package vetting, dependency auditing, and developer education about verifying sources and package integrity. Simply reacting after malware is published is not enough.
Organisations can enhance their security posture by utilising automated tooling that scans dependencies for malicious behaviour before integration and by implementing principles of least privilege and zero-trust security around code execution environments. Additionally, fostering a culture where security awareness is ingrained among developers—encouraging scepticism towards unfamiliar packages and verifying package provenance—helps reduce inadvertent exposure to vulnerabilities. These steps, combined with continued collaboration among repository maintainers, security researchers, and the community, help build resilient defences against supply chain threats like XORIndex.
In conclusion, the expansion of the Contagious Interview campaign with XORIndex malware serves as a reminder that supply chain security is a complex and evolving challenge. While no solution can guarantee perfect defence, layered approaches that address technical, procedural, and cultural factors collectively raise the bar for attackers. By understanding the tactics, techniques, and procedures used in such campaigns, cybersecurity professionals can better anticipate shifts in the threat landscape and strengthen the resilience of the software development ecosystem. Keeping open-source supply chains secure demands ongoing vigilance—because attackers will never stop innovating, and neither can we.