Massive CVE-2026-129514 RCE Affects Hex.pm Servers

Over the weekend, attackers exploited a critical remote code execution flaw in Hex.pm—Elixir and Erlang’s central package registry—to gain control over six production servers. The vulnerability, tracked as CVE-2026-129514 and rated CVSS 10.0, had been present since February 23, 2016. Security teams patched all affected servers within about 15 minutes of detecting the first malicious request. No changes to packages were found so far, though theft of user account data cannot be ruled out.

How the Hack Was Possible

The root cause was a flaw in the parser that decodes request bodies formatted in Erlang data. Because this parsing occurred before routing or authentication, attackers could send unauthenticated POST requests to any endpoint. The parser incorrectly allowed maps containing a __struct__ key, which enabled attackers to pose as any Elixir struct loaded by the server. The flaw allowed dangerous operations: when error-reporting logic lower in the stack encountered these structs via key libraries like Ecto and DBConnection, it reached a point where arbitrary OS commands could be executed using the registry’s service account permissions.

This insecure deserialization vulnerability was introduced in 2016 when a safety check that would have blocked __struct__ keys was removed. The parser was intended to reject unsafe data, but this deletion opened the door for exploitation.

What Hackers Did—And What’s Not Yet Clear

According to exploit data, between 18:16 and 18:29 UTC there were 69 malicious requests originating from two IP addresses. Six servers were affected: files were created visibly, including on one machine just 3 milliseconds after a request. Three servers still running the pre-patch version were brought up during the attack because they had been restarted.

Investigations found no alterations in published package content: database tables match backups taken two minutes before the exploit, and 23 releases during the attack correspond perfectly to audit logs. Nevertheless, because certain actions—such as file reads, environment variable leaks, shell commands, and data access—aren’t logged, the possibility remains that attackers accessed sensitive user information: including email addresses, password hashes, two-factor authentication secrets, session data, private packages, and possibly more.

Recommended Actions for Users & Maintainers

All users have been forcibly logged out while Hex.pm replaced session and access signing keys. Users are advised to:

  • Change their Hex.pm password.
  • Reset two-factor authentication and securely store recovery codes.
  • Reauthenticate using mix hex.user auth(for Elixir) or rebar3 hex user auth(for Erlang).
  • Update Hex client software once a new registry signing system is released, expected within days. Until then, fetch packages only from repo.hex.pmand avoid third-party mirrors.
  • Be on the lookout for phishing attempts, especially since email addresses may have been exposed—a detail attackers could exploit. Links in emails should always be validated to point to hex.pm.

API keys alone were not exposed in plaintext—they are stored as HMAC-SHA256 hashes of RNG-derived 128-bit values. Passwords, hashed with bcrypt, are somewhat protected, but users with weak passwords are still at risk.

Package consumers who never created a Hex.pm account and only pull public packages aren’t required to take action. Those who signed up through GitHub should still log back in and reset two-factor settings.

Fixes & Disclosure Timeline

The safety-check was reintroduced in a fix commit that makes the decoder reject any term containing a map with a __struct__ key. All Hex.pm servers were confirmed patched by 18:31 UTC that same Monday.

Logs suggest the exploit was live just briefly: the first request was observed around 18:16 UTC, patches rolled out by 18:31 UTC. A separate security report describing the same issue arrived after the attack had concluded. Regulatory bodies including the Swedish data protection authority, CISA (US), and ENISA (EU) have been alerted.

In concert with this disclosure, maintainers of three popular Elixir libraries—Ash, DBConnection, and Flop—revealed integer-CVEs of their own tied to unsafe struct deserialization, offering fixed updates. Each library’s issue requires certain conditions to be exploitable.

Organizations running private mirrors or hosting their own copies of the registry must apply the patch immediately, as infrastructure using the vulnerable parser is compromised until updated.

This incident highlights the long-tail danger of insecure deserialization flaws in package registries. Though no clear evidence yet confirms data theft or malicious package updates, the exposure of sensitive credentials brings serious risk. DevOps and security teams need to audit external dependencies rigorously, enforce safe input parsing, and act fast when rotation of keys and secrets is required. Keep an eye on Hex.pm’s forthcoming updates and library patches—this could serve as a wake-up call across software supply chains.