On Monday, a serious security flaw allowed attackers to execute operating system commands on six Hex.pm production servers. This package registry is crucial for Elixir and Erlang developers managing dependencies. The vulnerability had been present since February 2016, but Hex.pm maintainers quickly patched all servers within 15 minutes of detecting the malicious activity.
Details of the Security Breach
The exploit, identified as CVE-2026-129514, received the highest CVSS score of 10.0. It was embedded in the Hex.pm code responsible for parsing request bodies formatted in Erlang. This vulnerability enabled unauthorized POST requests to execute commands by exploiting a flaw in the error handling process of the Hex.pm servers.
The team has no evidence of altered packages, but potential unauthorized access to sensitive data, including email addresses, password hashes, and two-factor authentication secrets, remains a concern. Although the API keys are securely hashed, users are advised to change their passwords due to potential brute-force risks on weaker passwords.
Recommended Actions for Hex.pm Users
All Hex.pm account holders have been logged out as a precautionary measure. Users should immediately update their passwords and reset two-factor authentication settings. Logging back in with the appropriate authentication commands for Elixir or Erlang projects is necessary. Additionally, users should be wary of phishing attempts exploiting compromised email information.
Developers are advised to only download packages from the official repo.hex.pm until a new client release, featuring an updated registry signing system, is available. The registry signing key, potentially accessed by the attacker, has not yet been replaced.
Further Implications and Library Updates
Beyond Hex.pm, three prominent Elixir libraries have disclosed related vulnerabilities regarding struct building from untrusted data. These libraries have released patched versions: Ash (CVE-2026-124283), db_connection (CVE-2026-133555), and Flop (CVE-2026-130411). Each flaw requires specific conditions to be exploited, emphasizing the importance of implementing the latest updates.
The Hex.pm team has communicated the breach to relevant authorities, including the Swedish data protection authority, CISA in the U.S., and ENISA in the EU. Despite the swift response and remediation efforts, the identity of the attackers remains unknown.
The incident underscores the critical need for vigilance in software security practices. As investigations continue, Hex.pm users and organizations running their own registry copies are urged to apply the necessary patches to prevent further exploitation.
