Hex.pm hacked through CVE-2026-129514 deserialization flaw
Part of the CVE-2026-129514 story · since 24 Nov
- Tue 24 Nov, 15:55 UTC. cybersixt, first report. Hex.pm hacked through CVE-2026-129514 deserialization flaw. This article, 1st of 1.
An attacker exploited a flaw in Hex.pm, the package registry for Elixir and Erlang, to run commands on six of its web servers on Monday, the maintainers said on Tuesday. Hex blocked the traffic and deployed a fix within 20 minutes. The flaw, CVE-2026-129514, is rated 10.0 by the Erlang Ecosystem Foundation, which records it as actively exploited.
Hex found no evidence that packages or the database were changed, or that the attacker kept access. 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. It has replaced the credentials its servers held, which logged every user out of hex.pm and the Hex clients.
What users should do
- Change the password at hex.pm.
- Reset 2FA on the account security page by setting up a new authenticator app, which issues a new secret and new recovery codes.
- Fetch packages only from repo.hex.pm, not from third-party mirrors, until new Hex clients ship.
- Update the Hex client with
mix local.hex --force, and rebar3 or Gleam, when the release with a new signing system is out in the coming days. - Be wary of emails that claim to come from Hex, since addresses may have been exposed.
In a post on the Elixir Forum, the Hex team also tells users to log in to their client again with mix hex.user auth or rebar3 hex user auth, and to upgrade three libraries: Ash to 3.38.0 or later (CVE-2026-124283), db_connection to 2.10.3 or later (CVE-2026-133555) and flop to the latest version (CVE-2026-130411).
How the attack worked
Hex.pm accepted request bodies in Erlang's external term format and decoded them with a function that refuses functions and new atoms but not maps. The parser ran before routing and authentication, so any unauthenticated POST reached it. An Elixir struct is a map with a __struct__ key naming a module, so the attacker could send a fake struct with every field chosen.
The fake struct made a request fail, and the error reporting (Sentry, the web server's error log and the JSON log formatter) called inspect on it. Because inspection dispatches on the module named in the struct, the attacker chose which code ran next: an Ecto query type whose inspection walked a field without checking it was a list, then a DBConnection stream whose error path applied a module, function and arguments taken from the request. That led to operating system commands running as the user of the Erlang VM.
While investigating, Hex found the same class of flaw in the Ash framework, where crafted structs in pagination cursors could lead to command execution or SQL injection. Ash fixed it in version 3.38.0 on Tuesday, tracked as CVE-2026-124283.
Timeline
All times UTC, from Hex's report:
- Monday 23 November, 18:16 to 18:29: the attacker sent 69 malicious requests. Six servers were hit, three of them because a restart at 18:28 brought up servers still on the vulnerable build.
- 18:27: a firewall rule against the attacker's traffic was added, fully effective by 18:33. By 18:31 every server ran a patched build.
- 19:07: a security report describing the same vulnerability arrived by email.
- 22:58 to 23:26: Hex reported a personal data breach to IMY, Sweden's data protection authority, reported the incident to CISA and sent an early warning to ENISA.
- Tuesday 24 November, 13:48: CVE-2026-129514 was published.
What remains
Hex has rotated its storage, CDN, email and database credentials and the keys that sign sessions and access tokens. It has not yet replaced the registry signing key, and is building a signing system that supports key rotation. It says it checked every file written to package storage during the incident and found nothing unexpected, but a read of private packages from a compromised server would look like one of its own, so it will contact affected organisations directly.
The fix makes the decoder reject any term containing a struct. Hex says it is also working on hardening in the plug_crypto, plug, ecto and db_connection libraries, so a single decoder check is not the only defence.
How the story developed
1 article from 1 outlet since 24 Nov. Still developing; the latest report was 53 minutes ago. This was the first report.
- Tue 24 Nov, 15:55 UTC. cybersixt, first report. Hex.pm hacked through CVE-2026-129514 deserialization flaw. This article, 1st of 1.
- CVE not in KEV
- No CVE
- Larger: an outlet’s first report
- Coverage over time
Show all 1 articles as a listHide the list
- Tue 24 NovDay 01
- Hex.pm hacked through CVE-2026-129514 deserialization flaw15:55 · cybersixt · First report · This article, 1st of 1
Sources
More reporting
- DGAC hack: French aviation fee site leaks partial card data24 Nov
- Rakuten Securities data breach: leak of 4.41M confirmed24 Nov
- Elecbrakes flaw CVE-2026-96805 lets anyone apply trailer brakes24 Nov
- Keio ransomware attack: 10.6M customers' data may have leaked24 Nov
- Legal Aid Agency data breach: £74.3M set aside for claims24 Nov
Written by CyberSIXT from the sources above.How we reportCorrectionsRSS