Hex.pm Hit by Max-Severity RCE; Change Password and Reset 2FA

Attackers ran commands on six Hex.pm servers on Nov 23 via CVE-2026-129514. No package changes found, but password hashes and 2FA secrets may be exposed.

An attacker exploited a maximum-severity flaw in Hex.pm, the package registry for Elixir, Erlang and Gleam, to run commands on six of its web servers on November 23. Hex says it found no tampered packages, but it cannot rule out that account data, including password hashes and two-factor secrets, was read.

What happened

In its incident report, published November 24, the Hex team says the attacker sent 69 malicious requests between 18:16 and 18:29 UTC. Hex says it blocked the traffic and deployed a fix within 20 minutes, with every server running a patched build by 18:31 UTC. Six servers were affected because a restart at 18:28 brought up three new servers that were still on the vulnerable build.

The flaw is tracked as CVE-2026-129514 and carries a CVSS score of 10. According to Hex, the registry decoded unauthenticated request bodies in Erlang’s external term format before routing or authentication. The decoder rejected functions and new atoms but let through maps carrying a __struct__ key, which the runtime treats as a real Elixir struct. Hex describes how the attacker chained those fake structs through error reporting and two database libraries until an operating-system command ran as the service user. Its git history shows the safety check was removed from the decoder on February 23, 2016.

Who is affected

  • Package integrity: Hex reports “no evidence of unauthorized package modifications.” All 23 releases published during the incident match its audit log, and the 62 package files and 186 registry files written since 18:00 match its database records.
  • Account data: Database reads are not logged, so Hex cannot rule out access to email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs.
  • API keys: Hex says its keys are 128-bit random values stored as HMAC-SHA256 hashes, and it sees no need to rotate them.
  • Private packages: Hex says the private-package reads it observed came from its own servers, but a read from a compromised server would look the same. It says it will contact affected organizations directly.
  • Self-hosted registries: Security firm Ostorlab says the Hex client is not affected, but anyone running their own copy of the hexpm server is exposed until they deploy fix commit 379b0a2.

What to do

Hex asks every account holder to change their hex.pm password and reset two-factor authentication from the security dashboard (choose “Setup New App” and store the new recovery codes). It also asks users to update their Hex client when the release with its new signing system ships, and until then to fetch packages only from repo.hex.pm and not from third-party mirrors. Because email addresses may have been exposed, check that links in any message claiming to come from Hex lead to hex.pm.

Our analysis: Hex says rotating its credentials logged everyone out of hex.pm and Hex clients, so expect CI jobs that authenticate to Hex to need fresh credentials. If you run your own hexpm registry, deploy commit 379b0a2 or later, restart every node and rotate the credentials the service could read. If you use the Ash framework, Hex and SecurityWeek note that Ash 3.38.0 fixes a related flaw, CVE-2026-124283.

What we still do not know

  • Whether the attacker actually read database contents. Hex says that cannot be determined from its logs.
  • Who was behind the attack. Hex’s report refers only to two attacking addresses and does not name an actor.
  • When the new registry signing system and Hex client releases ship. Hex had not rotated the registry signing key when it published its report, and we have not confirmed that the new client is out. Check the Hex blog for status.

Sources: Hex.pm, “Security incident on hex.pm” (Nov 24, 2026); SecurityWeek, “Hex Package Manager Warns of Potential Data Breach” (Nov 27, 2026); Ostorlab, “Hex.pm Registry RCE, Exploited in the Wild” (Nov 25, 2026).

Leave a Reply

Your email address will not be published. Required fields are marked *