Hex.pm discloses a breach of its web servers and asks Elixir and Erlang developers to change passwords and reset 2FA
An attacker ran commands on six hex.pm servers on November 23. The registry found no tampered packages, but cannot rule out that password hashes, 2FA secrets and other database data were read.
Hex.pm, the package registry used by Elixir, Erlang and Gleam projects, published a security incident report on November 24, 2026. According to the post, signed by Peter Ullrich, Jonatan Männchen and Eric Meadows-Jönsson, an unauthorized third party exploited a vulnerability on November 23 that let them run commands on hex.pm web servers. The team says it blocked the traffic and deployed a fix within 20 minutes. The vulnerability is tracked as CVE-2026-129514, which Hex.pm published at 13:48 UTC on November 24.
Per the report's timeline, the attacker sent 69 malicious requests between 18:16 and 18:29 UTC, and six web servers were affected. All hex.pm servers were running a patched build by 18:31 UTC.
What Hex.pm found and what it cannot rule out
Hex.pm says it found no evidence of unauthorized package modifications, database changes or lasting access. All 23 releases published during the incident match its audit log, and all 62 package files and 186 registry files written since 18:00 UTC match the database. Because database reads are not logged, it cannot rule out that the attacker read email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs. Direct reads of private packages from cloud storage are not logged either; Hex.pm says it will contact affected organizations directly.
The registry replaced the storage, CDN, email and database credentials and the keys that sign sessions and access tokens, which logged everyone out of hex.pm and Hex clients. As of 10:42 UTC on November 24, every credential the attacker could have read had been rotated except the registry signing key and a few low-impact secrets. Hex.pm says it is building a new registry signing system that supports key rotation, with new Hex client releases in the coming days.
What developers should do
- Change your password at hex.pm.
- Reset 2FA at hex.pm/dashboard/security with "Setup New App", which issues a new secret and new recovery codes.
- Until the new Hex client is out, do not trust third-party mirrors and fetch packages only from repo.hex.pm.
- When the release is out, run mix local.hex --force, and update rebar3 or Gleam if you use them.
- Treat emails claiming to come from Hex with care, since email addresses may have been exposed.
Hex.pm does not ask users to rotate API keys: they are 128-bit random values stored as HMAC-SHA256, which it considers beyond the reach of brute force.
How the attack worked
hex.pm decoded unauthenticated request bodies in Erlang term format with Plug.Crypto.non_executable_binary_to_term/2. That function blocks most harmful terms but lets struct values through. The attacker sent fake structs that, through Plug.MethodOverride, error reporting that calls inspect, and protocol implementations in Ecto and DBConnection, ended with the server applying an attacker-supplied {module, function, args} tuple and running OS commands. Hex.pm says the safety check in that decoder was removed on February 23, 2016. The fix, hexpm commit 379b0a2, rejects any decoded term containing a map with a __struct__ key and returns a 400.
While investigating, the team found the same class of flaw in the Ash framework's keyset pagination cursors, which could lead to command execution or SQL injection. According to Hex.pm, Ash released a fix in ash 3.38.0 on November 24, tracked as CVE-2026-124283; the Hex.pm package page also lists 3.38.1.
What is not known yet
Both sources for this story are published by Hex.pm itself; there was no independent coverage at the time of writing. The report does not give a date for the new Hex client releases, and Hex.pm says it will update the post as the investigation continues.
Why this matters
- Anyone who publishes or installs Elixir, Erlang or Gleam packages has an account or a dependency path through hex.pm, and the registry asks for concrete actions today: a new password, new 2FA secrets and no mirrors.
- The exploit chain started in a decoder applied to unauthenticated input before routing; any Elixir service that decodes Erlang terms from untrusted clients, including Ash keyset pagination users, should check for the same pattern.
Key takeaways
- CVE-2026-129514: an attacker ran commands on six hex.pm web servers on November 23 between 18:16 and 18:29 UTC.
- No modified packages or database writes were found, but database reads, including 2FA secrets and password hashes, cannot be ruled out.
- Change your hex.pm password, reset 2FA, use only repo.hex.pm and update the Hex client when the new signing system ships.
- The same class of bug was fixed in ash 3.38.0 as CVE-2026-124283.
Sources
- HexPrimarySecurity incident on hex.pmhex.pm
- HexPrimaryash package page on Hex (versions 3.38.0 and 3.38.1)hex.pm
- security
- elixir
- erlang
- package-registry
- supply-chain
- Hex
- Ash