An Eight-Year-Old Bug Let Hackers Hit Hex Servers

TL;DR: Hackers exploited a critical vulnerability in the Hex.pm package registry that went unnoticed for eight years. The flaw allowed them to run commands on production servers before the Hex team patched it within 15 minutes of detection.
Key facts
- Category
- Cybersecurity
- Impact
- Critical
- Published
- Source
- The Hacker News
Full summary
Hackers used a critical, eight-year-old vulnerability to run commands on six production servers of the Hex.pm package registry for Elixir and Erlang.
The Hex.pm package registry, a cornerstone of the Elixir and Erlang development ecosystems, recently faced a serious security breach. According to The Hacker News, an attacker successfully exploited a critical vulnerability to gain access and run operating system commands on six of its production servers. The incident highlights the persistent threat to software supply chain infrastructure. In a remarkable display of incident response, the Hex.pm team identified the malicious activity and deployed a patch across all servers within approximately 15 minutes of the first attack. This swift action likely prevented a much more severe and widespread compromise, though the event serves as a stark reminder of the vulnerabilities that can lie dormant in critical systems.
The exploited flaw was a Remote Code Execution (RCE) vulnerability, one of the most severe types of security bugs. An RCE allows an attacker to run arbitrary code on a target machine as if they were physically there. In this case, the vulnerability had been present in the registry's codebase since February 2016, remaining undiscovered for over eight years. For a package registry like Hex.pm, which serves as a central distribution point for software libraries, an RCE is a worst-case scenario. An attacker with this level of control could potentially inspect private packages, steal credentials, or, most dangerously, modify existing software packages to inject malicious code that would then be distributed to thousands of developers and applications downstream.
This attack fits into a broader, troubling trend of targeting software supply chains. Security researchers and malicious actors alike have increasingly focused on package registries (like npm for JavaScript, PyPI for Python, and Hex.pm for Elixir/Erlang) as high-value targets. By compromising a single central point, an attacker can achieve a massive ripple effect, turning trusted software updates into a vector for widespread infection. Past incidents, such as the SolarWinds breach and various attacks on the npm registry, have demonstrated the devastating potential of this attack vector. These events prove that the security of the applications we build is fundamentally tied to the security of the open-source infrastructure and dependencies they rely on.
While the Hex.pm team's rapid response is commendable and serves as a model for effective incident management, the discovery of an eight-year-old critical flaw is a sobering lesson for all development and security teams. It underscores the reality that even mature and well-maintained projects can harbor hidden, high-impact vulnerabilities. For CTOs and engineering leaders, this incident reinforces the need for a defense-in-depth security strategy. This includes not only securing your own code but also implementing rigorous processes for managing third-party dependencies, employing security scanning tools, and, crucially, having a well-rehearsed incident response plan. The key takeaway is that trust in the software supply chain cannot be absolute; it must be continuously verified.
Why it matters
This attack targeted Hex.pm, the central package registry for the Elixir and Erlang ecosystems. A compromise of this core infrastructure could have led to a widespread supply chain attack, injecting malicious code into countless applications that depend on it and highlighting the fragility of open-source registries.
Business impact
A breach in a core software dependency registry poses a significant business risk, potentially leading to compromised products, data breaches, and reputational damage. This incident underscores the need for companies to invest in software supply chain security and robust incident response plans to mitigate downstream consequences.
Action checklist
- 1Verify the integrity of your project dependencies and ensure you are using lockfiles.
- 2Review internal security monitoring and build pipeline logs for any unusual activity.
- 3Confirm your organization has a rapid incident response plan for supply chain threats.
- 4Audit your team's reliance on and security posture regarding third-party package registries.
Tags
Related on Notifire
Related stories
Primary source: The Hacker News