The short version
- The attack. Sixty-nine exploit requests from two addresses reached Hex.pm, the package registry for Elixir and Erlang, between 18:16 and 18:29 UTC on 23 November. Files created by the exploit appeared on six production web servers, and Hex says a firewall rule fully blocked the attacker's traffic at 18:33.
- The flaw. CVE-2026-129514 carries a CVSS score of 10.0 and sits in the parser that reads Erlang-format request bodies before routing and authentication. The safety check that would have blocked it was removed from the code in February 2016.
- Packages intact. The team compared every database table against a copy taken two minutes before the first request and traced each difference to normal activity. The 23 releases published during the attack match the audit log, no older release was changed, and Hex says it found no evidence of unauthorised package modifications or database changes.
- Account data at risk. Database reads and direct reads from file storage were not logged, so the team says it cannot rule out access to email addresses, password hashes, API key hashes, two-factor secrets, session data, audit logs and private packages. Every user has been logged out while credentials are replaced.
- Separate library fixes. Maintainers of the ash, db_connection and flop libraries shipped fixes for their own flaws involving structs built from untrusted data. The sources describe these as separate disclosures, not further attacks on Hex.pm.
Timeline
| Date | Event |
|---|---|
| February 2016 | A safety check is removed from the hex.pm request-body decoder, introducing the flaw that was later tracked as CVE-2026-129514. |
| 23 Nov | Sixty-nine exploit requests from two addresses arrive between 18:16 and 18:29 UTC; files created by the exploit appear on six web servers. |
| 23 Nov | Every hex.pm server is running the fixed build by 18:31 UTC. |
| 23 Nov | Hex says it replaced all servers with patched versions at 18:30 and that a firewall rule fully blocked the attacker's traffic at 18:33. |
| 23 Nov | A separate security report describing the same flaw arrives by email at 19:07 UTC, after the attack has ended. |
| 23 Nov | Hex.pm reports the breach to the Swedish data protection authority, CISA and ENISA. |
| 24 Nov | The Hex.pm team publishes its incident report, and fixed versions of the ash, db_connection and flop libraries are released. |
How the attack worked
The flaw sat in the parser hex.pm used to read request bodies sent in Erlang's external term format. That parser ran before routing and authentication, so an unauthenticated POST request to any address on the site could reach it. The decoder blocked dangerous terms but accepted maps carrying a __struct__ key, letting a request body pose as any Elixir struct the application had loaded. A crafted struct ran nothing by itself: it caused an error, and the error-reporting code inspected the struct through the Ecto and DBConnection database libraries until the server called a function of the attacker's choice, running operating system commands with the registry service account's permissions.
The safety check that would have stopped this was removed from the code on 23 February 2016, which is where the flaw's age comes from. Exploitation before 23 November has not been established. Load balancer logs recorded 69 exploit requests between 18:16 and 18:29 UTC from two addresses. Files created by the exploit appeared on six web servers, in one case 3 milliseconds after the request; three of those servers joined mid-attack when a restart brought up machines still on the vulnerable build.
The two accounts of the response differ slightly. The Hex.pm team says every server was on the fixed build by 18:31 UTC; SecurityWeek, citing Hex, says all servers were replaced with patched versions at 18:30 and that a firewall rule fully blocked the attacker's traffic at 18:33. A separate security report describing the same flaw arrived by email at 19:07 UTC, after the attack had ended. Activity from the two addresses going back to late the previous week suggests the attacker built a local copy of hex.pm to test against, according to the team.
What may have been exposed
The registry database holds email addresses, password hashes, API key hashes, two-factor authentication secrets and session data, and private packages could have been read without leaving a trace. Database reads, shell commands, environment variables and direct reads from file storage were not logged. "We cannot rule out that the attacker accessed data stored in the database," the team wrote. Hex also says any read of a private package made from a compromised server would look legitimate, and that audit logs may have been accessed.
The checks found no leftover shells and no new accounts or cloud keys in the audit logs. Hex says it found no evidence that the attacker kept access. The team 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 the Hex clients. By the morning of 24 November every credential the attacker could have read had been replaced except the registry signing key; a new signing system with key rotation support is in progress. Hex reported the breach to the Swedish data protection authority, CISA and ENISA on the night of 23 November.
The related library flaws
Fixed versions of three Elixir libraries were released on 24 November: ash (CVE-2026-124283), db_connection (CVE-2026-133555) and flop (CVE-2026-130411). The sources describe them as separate disclosures, not further attacks on the registry. SecurityWeek reports that Hex found the Ash Framework was affected by the same class of vulnerability, and that Ash warned its flaw could lead to code execution or SQL injection.
Each library flaw needs its own conditions to be exploited. The Ash flaw requires keyset pagination with a client-supplied cursor, certain sort field types and a signing secret left at its unset default, according to the Ash advisory. The DBConnection advisory says its flaw is not exploitable in db_connection alone because another component must first decode untrusted data into structs, and the Flop flaw has similar conditions around its pagination cursors. The flaw exploited at Hex.pm sits in the hexpm server code, not in the Hex client, so organisations that run their own copy of the registry are affected until they deploy the patch.
What is not known yet
- Who carried out the attack. No source attributes it.
- Whether the attacker actually read account data, private packages or audit logs, as opposed to only being able to.
- Whether the registry signing key, which had not been replaced as of 24 November, was read.
- How many accounts or organisations are affected.
- Whether the activity from the two addresses in the preceding week was reconnaissance against a test copy of the registry.
What to do
If you have a hex.pm account
- Change your hex.pm password.
- Reset two-factor authentication by setting up a new authenticator entry and storing the new recovery codes.
- Log back in to the client with mix hex.user auth, or rebar3 hex user auth for Erlang projects.
- Treat any email about Hex with care and check that its links lead to hex.pm, because exposed email addresses may be misused for phishing.
If you run your own Hex registry or use the Elixir libraries
- Deploy the hexpm patch to any self-hosted copy of the registry.
- Upgrade the ash, db_connection and flop libraries to the fixed releases named in their advisories.
For everyone else
- Fetch packages only from repo.hex.pm and avoid third-party mirrors until the new Hex client ships.
- Update the Hex client when the next release arrives, which brings the new registry signing system.
Update log
- Added Hex's firewall block at 18:33, the full list of credentials replaced, and the Ash flaw's possible code execution and SQL injection impact.
- First published.
Sources
New incident reports by email
One email a week with the reports published since the last one.
We email you about this topic only; unsubscribe any time. See our Privacy Policy.