Hex.pm Package Registry Compromised via Critical CVSS 10.0 RCE Flaw
Share
Maintainers of Hex.pm, the central package registry for the Elixir and Erlang programming languages, have patched a critical remote code execution (RCE) vulnerability that was exploited to compromise six production servers on Monday.
The flaw, tracked as CVE-2026-129514, carries the maximum CVSS severity score of 10.0. It allowed unauthenticated attackers to execute operating system commands with the permissions of the registry’s service account. The Hex.pm team confirmed that the vulnerability had existed in the registry’s code since February 2016.
According to an incident report from the registry maintainers, the attack involved 69 malicious requests originating from two IP addresses. While the maintainers deployed a patch to all production servers within 15 minutes of the first request, they confirmed that files created by the exploit were found on six web servers.
Potential Data Exposure and User Security
An internal audit found no evidence that any packages were altered during the intrusion. The team verified that the 23 releases published during the attack window matched the official audit logs and that no historical releases were modified.
However, the Hex.pm team warned that they cannot rule out the possibility that the attackers accessed the registry’s database. This database contains sensitive information, including email addresses, password hashes, API key hashes, and two-factor authentication (2FA) secrets. Private packages may also have been read without leaving a trace in the logs.
As a result, all Hex.pm users have been logged out, and session signing keys have been replaced. The maintainers recommend that all account holders take the following security measures:
- Change their Hex.pm password immediately.
- Reset two-factor authentication by setting up a new authenticator and storing new recovery codes.
- Re-authenticate local clients using
mix hex.user authorrebar3 hex user auth. - Monitor for phishing attempts, as exposed email addresses may be targeted.
Technical Origins of the Flaw
The vulnerability resided in the parser Hex.pm used to process Erlang data format request bodies. This parser ran before authentication or routing, meaning an unauthenticated POST request could reach the vulnerable code. While the decoder was designed to block dangerous functions, it incorrectly accepted maps with a __struct__ key, allowing attackers to pose as Elixir structs.
The incident has also prompted related security disclosures in three widely used Elixir libraries. Maintainers of Ash, DBConnection, and Flop released patches yesterday for separate vulnerabilities involving structs built from untrusted data. These are distinct issues from the Hex.pm breach but follow a similar logic regarding how data is deserialised.
The Hex.pm team has already replaced most credentials the attacker could have accessed, with the exception of the registry signing key, which is scheduled for replacement. The breach has been reported to the Swedish data protection authority, CISA in the United States, and ENISA in the European Union.



