Threat Intelligence

Hex.pm Package Registry Breached Through a 10-Year-Old Flaw: What Elixir and Erlang Teams Need to Do

The Hacker News · 25 Nov 2026
Key Takeaway If your team uses Hex.pm accounts, change passwords, reset two-factor authentication and pull packages only from repo.hex.pm until the signing key is replaced.

An attacker ran operating system commands on six production servers of Hex.pm, the package registry Elixir and Erlang developers use to fetch dependencies. The flaw, tracked as CVE-2026-129514 with the maximum CVSS score of 10.0, had been in the registry's code since 23 February 2016, when a safety check was removed. The maintainers had every server on a patched build within about 15 minutes of the first malicious request.

The flaw sat in a parser that read request bodies sent in an Erlang data format. Because it ran before routing and authentication, an unauthenticated request to any address on the site could reach it. The decoder blocked dangerous terms but accepted maps with a __struct__ key, letting a request pose as an Elixir struct. That triggered an error, and the error reporting code then inspected the struct, which eventually led the server to call a function of the attacker's choice. Load balancer logs recorded 69 exploit requests in about 13 minutes from two addresses. The team believes the attacker tested against a local copy of Hex.pm beforehand.

The team compared every database table against a copy taken two minutes before the first request and found no sign of tampering. The 23 releases published during the attack match the audit log. However, database reads, shell commands and direct file storage reads were not logged, so the team cannot rule out access to email addresses, password hashes, API key hashes, two-factor secrets, session data and private packages.

All users have been logged out after session and token signing keys were replaced. Account holders should change passwords and reset two-factor authentication; API keys do not need replacing. Until a new client ships, fetch packages only from repo.hex.pm and avoid third-party mirrors, as the registry signing key has not yet been replaced. Organisations running their own hexpm server are affected until they patch. Separate struct-related flaws in Ash, DBConnection and Flop were also disclosed, but these are not further attacks.

Why it matters

The exploited code ran before authentication, so account hygiene offered no protection, and a 10-year-old removed check shows how long a latent flaw in trusted infrastructure can go unnoticed. Teams that depend on Hex.pm, or run their own hexpm server, must treat the registry signing key as potentially exposed and cannot assume a clean package audit covers stolen data, since reads were not logged.

What to do

  • Change your hex.pm password and reset two-factor authentication if enabled.
  • Fetch packages only from repo.hex.pm and avoid third-party mirrors until the new client ships.
  • Patch any self-hosted hexpm server with the fix that rejects maps containing a __struct__ key.
  • Log back in to your Hex clients if you signed up with GitHub, and reset two-factor authentication if you enabled it.
Hex.pm supply chain Elixir remote code execution CVE-2026-129514
Answering to more than one framework? Run them as one security and AI governance programme ->

Summarised by CISO AI from The Hacker News, written with Claude Sonnet 5.5. We link back to every original so you can read it yourself.