Hex.pm contains critical RCE after intrusion reached six servers

Hex.pm, the package registry used by Elixir and Erlang developers, said an attacker executed operating-system commands on six production servers by exploiting CVE-2026-129514, a remote-code-execution vulnerability rated CVSS 10.0. The maintainers deployed a patched build to every server within about 15 minutes of the first malicious request.
Load-balancer logs recorded 69 exploit requests from two addresses between 18:16 and 18:29 UTC on Monday. Files created through the exploit appeared on six web servers; on one system, this occurred three milliseconds after the request. Three servers entered the incident while restarting on the still-vulnerable build.
A parser flaw exposed the registry before authentication
The issue had existed in Hex.pm server code since February 23, 2016. It affected the parser used for request bodies in an Erlang data format and ran before routing and authentication. An unauthenticated POST request to any site address could therefore reach the decoding path.
The decoder blocked dangerous terms such as functions, but accepted maps containing a __struct__ key. That let an attacker make request data appear to be an Elixir struct already loaded by the application. The crafted struct did not itself execute code. Instead, it triggered an error, after which error-reporting inspection through the Ecto and DBConnection libraries reached a call to a function selected by the attacker. That function could run operating-system commands with the registry service account's permissions.
The patch rejects any decoded term containing a map with a __struct__ key. Hex.pm said all servers were on the fixed build by 18:31 UTC. The team said it has not established exploitation before Monday, although activity from the two addresses since late last week suggested that the attacker may have tested against a local Hex.pm copy.
No changed packages found, but data access remains possible
Maintainers compared every database table with a copy made two minutes before the first exploit request and attributed every difference to normal activity. All 23 releases published during the attack matched the audit log, no older release was changed, and package and registry files written that evening matched database records.
Those checks do not prove that information was untouched. Database reads, shell commands, environment variables and direct reads from file storage were not logged. Hex.pm therefore cannot rule out access to email addresses, password hashes, API key hashes, two-factor authentication secrets, session data or private packages. Investigators found no leftover shells and no new accounts or cloud keys in audit logs.
Hex.pm logged out every account holder after replacing the keys used to sign sessions and access tokens. Users should change their Hex.pm password, reset two-factor authentication, save new recovery codes and authenticate their clients again with mix hex.user auth or rebar3 hex user auth. The maintainers said API keys need not be replaced because they are random 128-bit values stored only as HMAC-SHA256 hashes, while bcrypt password hashes still make weak passwords a concern.
Client and library actions remain important
A new Hex client with a new registry-signing system is expected within days. Until then, maintainers advise fetching packages only from repo.hex.pm and avoiding third-party mirrors, because the registry signing key had not yet been replaced and was among the credentials an attacker could have read. Developers who only fetch public packages and never created a Hex.pm account have nothing to reset.
Separate fixes were also issued for Ash, DBConnection and Flop flaws involving structs built from untrusted data. Ash fixed CVE-2026-124283 in version 3.38.0, DBConnection fixed CVE-2026-133555 in 2.10.3, and Flop released 0.26.7, 0.27.3, 0.28.1 and 0.29.2 for affected branches. These disclosures were separate from the Hex.pm intrusion and have their own exploitation conditions.
Organizations operating their own Hex.pm registry should deploy the server-side patch, while teams using the public service should rotate account protections, re-authenticate clients and restrict package retrieval to the official endpoint until the updated signing system is available.

