
Hex.pm Patches CVSS 10.0 RCE Flaw After Attack on Six Servers
The Hex.pm package registry says an attacker ran operating system commands on six production servers via a CVSS 10.0 flaw, and that the maintainers had every server on a patched build within about 15 minutes of the first malicious request.
An attacker ran operating system commands on six production servers of Hex.pm, the package registry for Elixir and Erlang developers, through a maximum severity vulnerability. The maintainers said every server was on a patched build within about 15 minutes of the first malicious request, and checks found no sign that any package was changed.
Flaw and Attack
The flaw is CVE-2026-129514 with a CVSS score of 10.0. It sat in the parser Hex.pm used to read Erlang-format request bodies. That parser ran before routing and authentication, so an unauthenticated POST request to any site address could reach it. The decoder blocked dangerous terms such as functions but accepted maps with a __struct__ key, letting a request body pose as any loaded Elixir struct. A safety check that would have stopped this was removed on February 23, 2016. A crafted struct caused an error, and error reporting inspected it. Through Ecto and DBConnection, that inspection led to a server call to an attacker-chosen function, which ran operating system commands with the registry service account's permissions. The fix rejects any term containing a map with a __struct__ key, and every Hex.pm server was running it by 18:31 UTC on Monday. Load balancer logs recorded 69 exploit requests between 18:16 and 18:29 UTC on Monday, all from two addresses.
Response and User Steps
Files created by the exploit appeared on six web servers, in one case 3 milliseconds after the request. Three servers joined mid-attack when a restart brought up machines still on the vulnerable build. The team replaced the keys that sign sessions and access tokens, logging out every Hex.pm account holder. It advises users to change their password, reset two-factor authentication with a new authenticator entry, store new recovery codes, and log back in with mix hex.user auth or rebar3 hex user auth. API keys do not need replacement because they are random 128-bit values stored only as HMAC-SHA256 hashes. Passwords use bcrypt, so changing weak passwords still matters. Until a new client ships, fetch packages only from repo.hex.pm and avoid third-party mirrors.
Data Review and Library Fixes
The team compared every database table against a copy taken two minutes before the first exploit request and traced each difference to normal activity. The 23 releases published during the attack match the audit log, no older release was changed, and package and registry files written that evening match database records. The team could not rule out that the attacker accessed database data, including email addresses, password hashes, API key hashes, two-factor authentication secrets, session data, and private packages. Database reads, shell commands, environment variables, and direct file storage reads were not logged. Checks found no leftover shells and no new accounts or cloud keys. The registry signing key had not yet been replaced and was among credentials the attacker could have read. Separately, Ash CVE-2026-124283, DBConnection CVE-2026-133555, and Flop CVE-2026-130411 were disclosed with fixed versions: Ash 3.38.0, DBConnection 2.10.3, and Flop 0.26.7, 0.27.3, 0.28.1, and 0.29.2. Each needs its own conditions to be exploited. The exploited Hex.pm flaw is in server code, so organizations running their own registry copy are affected until they deploy the patch.
Sources: The Hacker News
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.