Hex.pm Hacked: CVE-2026-129514 RCE Exploited, What to Do
TL;DR · the short version
On 23 November 2026 an unauthorized party exploited CVE-2026-129514, an unauthenticated remote code execution flaw in the hex.pm web application, and ran commands on six of its web servers between 18:16 and 18:29 UTC. Hex.pm, the package registry for Elixir and Erlang, blocked the traffic and replaced every server with a patched build by 18:31. It says it found no evidence of changed packages, database changes or lasting access, but database reads are not logged, so it cannot rule out that email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs were read. The registry signing key was readable by the compromised process and had not been rotated when Hex.pm published its notice. Hex.pm asks users to change their password, reset 2FA, update the Hex client when the new release ships and fetch packages only from repo.hex.pm until then.
Hex.pm, the package registry for Elixir and Erlang, says an attacker ran commands on six of its web servers on 23 November 2026 by exploiting CVE-2026-129514, an unauthenticated remote code execution flaw in the hex.pm web application. Hex.pm confirmed the intrusion itself in a post on 24 November, blocked the traffic and deployed a fix within about 20 minutes. It found no evidence that packages were changed, but it cannot rule out that account data was read.
Confirmed vs not yet known
Confirmed by Hex.pm:
- An unauthorized third party sent 69 malicious requests between 18:16 and 18:29 UTC on 23 November and ran commands on six web servers. Hex.pm: "Six servers were hit because a restart at 18:28 brought up three new servers still on the vulnerable build."
- No evidence of unauthorized package modifications, database changes or lasting attacker access. All 23 releases published during the incident match audit log entries; 62 package files and 186 registry files written since 18:00 UTC match database checksums.
- Infrastructure credentials were rotated (AWS key replaced at 18:47-18:49, most credentials by 20:21, the database password on 24 November).
- Reports went to IMY (the Swedish data protection authority) as a personal data breach, to CISA and, as an early warning, to ENISA.
Not known / not ruled out:
- Whether stored data was read. Database reads, environment variable reads and shell commands are not logged, so Hex.pm cannot rule out access to email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs.
- Whether the registry signing key was taken. The advisory says the attacker could read the application environment, which holds it. It had not been rotated when Hex.pm posted; no source says it was stolen.
- Whether private packages or private documentation were read. Direct cloud storage reads and private documentation reads are not logged. Hex.pm says it will contact affected organizations directly.
- Who the attacker is. No source names them.
What the vulnerability is
Per the GitHub advisory GHSA-9pmm-hf4r-27pg and the Erlang Ecosystem Foundation CVE record, the parser for application/vnd.hex+erlang request bodies decoded Erlang terms that could contain maps with a __struct__ key. Because that parser runs before routing and authentication, any POST route was reachable without an account. The CVE record traces the chain through Ecto.Query.DynamicExpr and DBConnection.Stream to an apply/3 call on a tuple taken from the request. It is CWE-502 (deserialization of untrusted data), scored CVSS 4.0 10.0 with exploit maturity "Attacked".
Affected: the hex.pm service from 2016-02-23 until the fix on 2026-11-23, and the open-source hexpm/hexpm application from commit ab1bbce up to commit 379b0a2, which makes the decoder reject any map with a __struct__ key and return HTTP 400. Anyone self-hosting the hexpm application should move to a build that includes that commit. The flaw is in the registry server, not in the Hex client on developer machines.
Hex.pm also points to two related Elixir library issues found while hardening: Ash keyset pagination accepted crafted structs in client-supplied cursors (CVE-2026-124283, fixed in ash 3.38.0), and db_connection :log callbacks (CVE-2026-133555). If you build on Ash, upgrade to 3.38.0 or later.
Timeline
| When (UTC) | What happened | Source |
|---|---|---|
| 23 Feb 2016 | Start of the affected range (introducing commit ab1bbce) | EEF CVE record |
| 23 Nov, 18:16-18:29 | 69 malicious requests; commands run on six web servers | Hex.pm |
| 23 Nov, 18:27 | Firewall rule blocks the attacker's traffic (full effect 18:30-18:33) | Hex.pm |
| 23 Nov, 18:30-18:31 | All hex.pm servers replaced with a patched build | Hex.pm |
| 23 Nov, 18:47-18:49 | Replacement AWS access key created; affected key deactivated | Hex.pm |
| 23 Nov, 19:07 | An emailed security report describing the same vulnerability arrives | Hex.pm |
| 23 Nov, 20:21 | Most infrastructure credentials rotated | Hex.pm |
| 23 Nov, 22:58-23:26 | Reports to IMY (22:58) and CISA (23:05, receipt confirmed 23:43); early warning to ENISA (23:26) | Hex.pm |
| 24 Nov, by 10:42 | Every credential the attacker could have read rotated, except the registry signing key and a few low-impact secrets | Hex.pm |
| 24 Nov, 13:48 | CVE-2026-129514 published; GitHub advisory GHSA-9pmm-hf4r-27pg | Hex.pm, GitHub |
What Hex.pm asks users to do
- Change your password at hex.pm.
- Reset your 2FA at hex.pm/dashboard/security: choose "Setup New App" under "Authenticator App", then store the new recovery codes.
- Update the Hex client when the new release is out with
mix local.hex --force, and update rebar3 or Gleam if you use them. Until then, Hex.pm says to fetch packages only fromrepo.hex.pmand not to trust third-party mirrors, because the signing key has not been rotated yet. - Treat Hex emails with care. Check that links lead to hex.pm and forward suspicious messages to security@hex.pm.
On API keys, Hex.pm says: "we don't see a need to rotate API keys because of the exposed hashes." The credential rotation already logged everyone out of hex.pm and Hex clients.
Useful next, if this was relevant to you
What security leaders should do this week
- Find your Elixir and Erlang footprint. List every repository with a
mix.lockorrebar.lockand every CI job that runsmix deps.getorrebar3. You cannot act on a supplier incident for code you do not know you ship. - Make every Hex account holder follow Hex.pm's steps. Password change and 2FA reset for anyone who publishes or owns an organization on hex.pm, with new recovery codes stored in your vault.
- Pin to repo.hex.pm. Check build config and
HEX_MIRRORsettings for third-party mirrors and remove them until the new signing system ships. Plan the Hex client, rebar3 and Gleam updates as a tracked change once released. - Verify lockfile checksums and review recent lockfile changes. Mix records a checksum per package in
mix.lock; review anymix.lockchange merged since 23 November, and make CI fail when a fetched package does not match. Hex.pm's own checks found every release from the incident window matched its audit log. - If you publish packages, check your own releases. Compare recent versions on hex.pm against your tags. Owners of private packages should watch for direct contact from Hex.pm.
- Decide on API keys under your own policy. Hex.pm does not ask for rotation. If your rule is to rotate CI publishing keys after any supplier incident, do it and record why. Our key rotation planner helps order the work.
- Scan for secrets that rode along. If Hex keys sit in repos or CI config, they are exposed whatever happened at Hex. Run the secret scanner over config and pipeline files.
- Self-hosting hexpm? Deploy a build with commit 379b0a2. If you use Ash, upgrade to 3.38.0.
- Brief the board in two lines: a package registry we depend on was breached; no package tampering is reported, and we have done what the registry asked.
Why it matters beyond Elixir
A registry sits upstream of every build that uses it. Here the attacker reached servers that held storage credentials and the registry signing key. Hex.pm's checksum comparisons are the reason it can say packages were not changed; documentation archives, which carry no checksum, could not be checked at all. For any registry you rely on, ask whether you would know within an hour that a package changed. To rehearse the decisions when a supplier is the entry point, use the Vendor Breach Lab; to see which known-vulnerable packages your lockfiles pull in, use the repo dependency exposure check. If storage or cloud keys are the worry, the leaked cloud key lab walks through the first hour. Hex.pm is now tracked in the Cyber Breach Index.
FAQ
Was Hex.pm hacked?
Yes, by Hex.pm's own account. Its 24 November 2026 post says "an unauthorized third party exploited a vulnerability in hex.pm that let them run commands on our web servers" on 23 November 2026. Hex.pm blocked the traffic and deployed a fix within about 20 minutes.
What is CVE-2026-129514?
An unauthenticated remote code execution flaw in the hex.pm web application (hexpm/hexpm). Per the GitHub advisory GHSA-9pmm-hf4r-27pg and the Erlang Ecosystem Foundation CVE record, the parser for application/vnd.hex+erlang request bodies accepted decoded maps with a __struct__ key, and because it runs before routing and authentication, any POST route was reachable. It is CWE-502 (deserialization of untrusted data), CVSS 4.0 score 10.0, marked as attacked.
Were Hex packages tampered with?
Hex.pm says it found no evidence of unauthorized package modifications, database changes or lasting attacker access. All 23 releases published during the incident match audit log entries, and the 62 package files and 186 registry files written since 18:00 UTC match database checksums. Documentation archives have no stored checksum, so they could not be checked.
What data could the attacker have read from Hex.pm?
Hex.pm cannot rule it out because database reads are not logged. The data at risk: email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs. The advisory says the attacker could read the application environment, which holds the database URL, storage credentials and the registry signing key. No source says any of this was taken.
What should Hex users do after the hex.pm incident?
Hex.pm asks users to change their password at hex.pm; reset 2FA at hex.pm/dashboard/security ("Setup New App" under "Authenticator App") and store the new recovery codes; and, when the new release is out, update the Hex client with mix local.hex --force (and rebar3 or Gleam if used). Until then, fetch packages only from repo.hex.pm and do not trust third-party mirrors. Be careful with emails claiming to be from Hex and forward suspicious ones to security@hex.pm.
Do I need to rotate my Hex API keys?
Hex.pm says "we don't see a need to rotate API keys because of the exposed hashes." Credential rotation logged everyone out of hex.pm and Hex clients. Rotating keys used in CI is still a reasonable precaution if your own policy calls for it after a supplier incident, but it is not what Hex.pm asked for.
Is the Hex client (mix) vulnerable to CVE-2026-129514?
The flaw is in the hex.pm server application, not the Hex client. The CVE record lists hexpm/hexpm as affected from 2016-02-23 up to the fix on 2026-11-23, and from commit ab1bbce to commit 379b0a2. Hex.pm has asked users to update the client once a new signing system ships, because the registry signing key has not yet been rotated.
Who did it?
No source names the attacker. Hex.pm says it received an email security report describing the same vulnerability at 19:07 UTC on 23 November, after the attack, and does not name the reporter.
Sources
- Security incident on hex.pm (Hex.pm, 24 Nov 2026)
- GHSA-9pmm-hf4r-27pg: Unauthenticated remote code execution through struct values in Erlang term request bodies (hexpm/hexpm, GitHub)
- CVE-2026-129514 (Erlang Ecosystem Foundation CNA)
- Fix commit 379b0a2 (hexpm/hexpm, GitHub)
- CVE-2026-124283 (Ash) and CVE-2026-133555 (db_connection) (EEF CNA)