Hex.pm, the Elixir and Erlang Package Registry, Breached via CVSS 10.0 Flaw
Attackers ran commands on six Hex.pm production servers on 23 November 2026 through a decade-old deserialization bug; packages were not altered, but account data may have been read.
An attacker ran operating-system commands on six production servers belonging to Hex.pm, the package registry that Elixir and Erlang developers use to fetch dependencies, on 23 November 2026, according to an incident report published by the Hex.pm team. The team says it found no evidence that packages were modified or that the attacker retained access after the fix went out, but it cannot rule out that the attacker read data from the Hex.pm database, including email addresses, password hashes, API key hashes and two-factor authentication secrets.
The flaw, tracked as CVE-2026-129514 and rated CVSS 10.0 by the Erlang Ecosystem Foundation's CVE Numbering Authority, sat in the code that decodes request bodies sent in Erlang's binary term format. According to the CVE record, the bug lived in HexpmWeb.ErlangFormat.decode/1, which processed the application/vnd.hex+erlang content type without properly validating struct objects, letting an unauthenticated request trigger arbitrary command execution on the server.
Hex.pm's own report traces the root cause further back: the decoder used Plug.Crypto.non_executable_binary_to_term/2, a function meant to block dangerous terms, but it still let Elixir structs through. From there, a crafted Plug.MethodOverride parameter triggered an error that Sentry's error-reporting code tried to inspect; inspecting an attacker-supplied Ecto.Query.DynamicExpr struct, in turn, let a forged DBConnection.Stream execute an arbitrary module-function-arguments tuple on the server. The report says this path has existed in the hexpm codebase since 23 February 2016.

What happened, hour by hour
Per the Hex.pm team's timeline, the attacker sent 69 malicious requests from two IP addresses between 18:16 and 18:29 UTC on 23 November 2026, hitting six of the registry's web servers. A firewall rule to block the attacker's traffic went in at 18:27, and by 18:30–18:31 UTC every server had been replaced with a patched build that rejects the forged payloads. A handful of further requests between 18:33 and 18:38 UTC were denied by the new build.
The team says it began reviewing logs and database activity at 18:35 UTC, deactivated an exposed AWS access key at 18:49, and had rotated most infrastructure credentials by 20:21 UTC the same day; the breach was reported to authorities in Sweden, the United States and the European Union between 22:58 and 23:26 UTC. By 10:42 UTC on 24 November, Hex.pm says all remaining accessible credentials had been rotated, and the CVE itself was published at 13:48 UTC that day.
Independent reporting by The Hacker News on 25 November 2026 confirms the same request window and server count, and reports that the flawed parser ran before routing and authentication, so an unauthenticated POST request to any address on the site could reach it. The outlet also reports that two other libraries, Ash and db_connection, plus the pagination package Flop, received their own CVE entries in the same disclosure round; in each case, exploiting the flaw on its own required conditions absent from the Hex.pm attack — for Ash, a client-supplied keyset-pagination cursor with the signing secret left at its default, and for db_connection, a separate component decoding untrusted data into structs first.
What was and was not affected
Hex.pm's report draws a clear line between what it has confirmed and what it cannot exclude. Confirmed: the attacker executed commands on the servers and could have read server-side credentials that were live at the time. Not ruled out: reads of the production database, including account emails, password hashes, API key hashes, two-factor secrets, session tokens and audit logs, as well as private documentation contents, which the report says are not logged closely enough to rule out. Ruled out, based on file-storage checks against the package database: any modification to published packages, any database writes, and any sign that the attacker retained access once the patch shipped.

What this means for developers and researchers
Hex.pm is the registry behind mix deps.get for every Elixir and Erlang project, including the Phoenix web framework and much of the BEAM ecosystem used in teaching and research settings. The team's report says anyone who only fetches packages without a Hex.pm account was not affected, but anyone with an account should change their password from the Hex.pm dashboard, reset two-factor authentication and generate new recovery codes, and re-authenticate the Hex command-line client with mix hex.user auth. The report also asks users to hold off switching away from repo.hex.pm until a new registry signing key is issued, since the current signing key has not yet been rotated.
For anyone studying software supply-chain security, the incident is a case study in how a safety check meant to stop one class of deserialization attack — blocking dangerous atoms and functions in untrusted Erlang terms — left a narrower path open through structs, undetected in the hexpm codebase for nearly a decade. The Hex.pm team's own account, rather than a third-party writeup, remains the most complete record of what the servers logged and what they could and could not confirm about the database.
A quick question for readers
Which skill will matter most for getting a job in 2030?
Everyone has a prediction. Add yours and see what students are betting on.
Pick an answer, create a free account in a minute, and your vote counts. Already a member? Sign in
Comments 3
Comment-
The part that stands out is how old the actual hole is versus how new the patch is. Plug.Crypto.non_executable_binary_to_term was built to s…
-
Credit where due: eleven minutes from first malicious request to a firewall rule, fifteen to a patched build on all six servers. That's a te…
-
What jumps out is that the forged DBConnection.Stream and the Ecto.Query.DynamicExpr path only existed because Sentry's own error-inspection…
Join free to read the full comments and reply Comments are between members; an account takes a minute.
Source: Hex.pm
Sources (3)
- Hex.pm team. Security incident on hex.pm. Hex.pm Blog, 2026. hex.pm ↗ · checked 27 Nov 2026
- Erlang Ecosystem Foundation CNA. CVE-2026-129514. cna.erlef.org, 2026. cna.erlef.org ↗ · checked 27 Nov 2026
- Swati Khandelwal. Hackers Exploited CVSS 10.0 Hex.pm RCE Flaw to Compromise 6 Package Registry Servers. The Hacker News, 2026. thehackernews.com ↗ · checked 27 Nov 2026