Skip to content
Hex.pm Breach: CVE-2026-129514 Exploited, Reset Your 2FA

Hex.pm Breach: CVE-2026-129514 Exploited, Reset Your 2FA

Cyberkendra • November 24, 2026

An attacker exploited a flaw in hex.pm, the package registry for the Erlang, Elixir, and Gleam ecosystems, to run operating system commands on six of its web servers on Monday, November 23, 2026, the Hex team disclosed on Tuesday .

Hex says it blocked the traffic, deployed a fix within 20 minutes, and found no evidence that any package was modified. However, it is asking every user to change their password and reset two-factor authentication (2FA) because it cannot rule out that its database was read.

The flaw, tracked as CVE-2026-129514 (GHSA-9pmm-hf4r-27pg), carries the maximum CVSS 4.0 score of 10.0 from the Erlang Ecosystem Foundation (EEF), which issues CVEs for the ecosystem and lists the bug as actively exploited. The vulnerable code dates to February 23, 2016, when a safety check was removed, so the hole sat in the registry for more than ten years. Hex.pm hosts more than 27,000 packages and has served over 16 billion downloads, according to its homepage.

Per Hex’s account, written by Peter Ullrich, Jonatan Männchen and Eric Meadows-Jönsson, the attacker’s first request arrived at 18:14 UTC and the first exploit request at 18:16. Over the 13 minutes the attacker sent 69 exploit requests, and commands ran on six web servers. Hex added a firewall rule at 18:27 and replaced every server with a patched build between 18:30 and 18:31, after three servers that had restarted at 18:28 were still running the vulnerable build.

The attack was not improvised. Hex says activity from the attacker since November 19 “suggests the attacker built a local copy of hex.pm to test against,” which is possible because the hexpm server code is open source. At 19:07 UTC, 35 minutes after the fix went live, Hex received an emailed security report describing the same vulnerability. The post does not name the reporter or say whether the report is connected to the attack.

How the Hex.pm Attack Worked

The entry point was a custom parser for the application/vnd.hex+erlang content type, which lets Hex clients send data in Erlang’s binary term format. The parser decoded request bodies with Plug.Crypto.non_executable_binary_to_term/2 , a function designed to block dangerous values such as anonymous functions. That function still lets through Elixir structs, which are maps carrying a __struct__ key that the runtime treats as typed objects, so an attacker could hand the server fake structs of their choosing. Because the parser ran before routing and authentication, any POST request reached it.

The EEF advisory describes the chain that followed. A forged struct made Plug.MethodOverride crash, and when Sentry, the Bandit web server’s error log, and the JSON log formatter tried to print the crash details, the printing code encountered a fake Ecto query object and then a fake DBConnection stream. That stream’s logging option accepted a module, function, and argument list taken straight from the request body, which the attacker used to run OS commands as the user running the BEAM, the Erlang virtual machine. Each request still ended in an ordinary 500 error.

The fix, commit 379b0a2 , makes the decoder reject any map with a __struct__ key and return a 400 error. While investigating, Hex found a similar class of bug in the Ash framework, now tracked as CVE-2026-124283 and fixed in ash 3.38.0 on November 24.

What Data Hex.pm Could Not Rule Out

Commands running as the BEAM user could read the application environment, which held the database URL, storage credentials, and the registry signing key, according to the EEF advisory. Hex does not log database reads, so it cannot rule out that the attacker accessed email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs. Passwords are hashed with bcrypt, which, as Hex notes, does not protect a weak password from being cracked. API keys are 128-bit random values stored as HMAC-SHA256 hashes, so Hex is not asking users to rotate them.

To check for tampering, Hex restored a database snapshot from 18:13:59 UTC and compared it row by row with the live database. All 23 releases published during the incident match the audit log entries, all 62 package files written since 18:00 match the database checksums, and all 186 registry files match the database contents. Hex found no shells on the servers, no deletions in cloud storage, and no new keys or accounts. It acknowledges the limits: a row changed and then restored would not show up, and documentation archives have no stored checksum to check against. One worker server’s traffic peaked at 0.47 MB/s, against a usual maximum of 0.29 MB/s.

Private package reads during the window came from Hex’s own servers and match releases those organizations published, but Hex cannot fully exclude reads from a compromised server, and private documentation reads are not logged. Hex says it will affected organizations directly.

What Hex.pm Users Should Do Now

The credential rotation has already logged everyone out of hex.pm and Hex clients. Hex asks users to change their password at hex.pm, then reset 2FA at hex.pm/dashboard/security by choosing “Setup New App” under “Authenticator App” and saving the new recovery codes. Because email addresses may have been exposed, Hex warns users to expect phishing and to check that links point to hex.pm.

Until new Hex client releases with the new signing system ship in the coming days, Hex says to fetch packages only from repo.hex.pm and not to trust third-party mirrors. Once they are out, Elixir users should run mix local.hex --force , and rebar3 and Gleam users should update those tools. Anyone running their own copy of the open-source hexpm server should update to a build that includes commit 379b0a2.

The breach comes seven months after Hex completed its first third-party security audit in April 2026, funded by the OpenSSF’s Alpha-Omega project and carried out by Paraxial.io and Zentrust partners, which led to a fix for an unsafe-deserialization bug in the hex_core client library (CVE-2026-21619). Hex has not said who was behind this week’s attack or whether any data left its servers, and its post names no law enforcement agency.

Join the conversation. Ask questions, solutions, and help others.

Be the first to start the discussion!

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.

Hex.pm Hosted Registry RCE (CVE-2026-129514) Exploited Against Six Web Servers; Account Resets Advised Hex.pm, the package registry for Erlang, Elixir and Gleam, disclosed that an unauthenticated remote code execution flaw, CVE-2026-129514 (CVSS 10.0), was exploited on November 23, 2026 to run OS commands on six hosted web servers. According to Hex's account, the attacker sent 69 exploit requests over about 13 minutes, and a firewall rule and patched build were deployed by 18:31 UTC. The flaw sat in a request-body parser that accepted Elixir struct markers before routing and authentication; the vulnerable check was removed on February 23, 2016. Hex says it found no evidence of unauthorized package modification or database changes, but because database reads are not logged it cannot rule out access to email addresses, password hashes, 2FA secrets, sessions and audit logs. Hex reports that activity since November 19 suggests the attacker built a local copy of hex.pm to test against, and that an emailed report of the same vulnerability arrived 35 minutes after the fix; the reporter's link to the attack is not stated. Hex replaced its infrastructure credentials and session/token signing keys, which logged all users out, and asks users to change passwords and reset 2FA. The registry signing key had not yet been replaced at the time of reporting, and Hex advises fetching packages only from repo.hex.pm until a new client ships. One dark-web post referencing the CVE was recorded by Brandefense; that count reflects discussion, not confirmed additional intrusions. 6 sources 77