Title: Hex.pm Servers Hit by CVSS 10.0 CVE-2026-129514: Fake Elixir Structs in Erlang Request Bodies Turned Into OS Commands — Account Holders: Change Your Password, Reset 2FA If You Had It On
Summary:
The breach began on November 23, 2026, when hex.pm, the package registry for the Elixir and Erlang ecosystems, took 69 malicious requests between 18:16 and 18:29 UTC from an unauthorized third party, and commands ended up running on six of its web servers — the first attacker-created file appeared 3 milliseconds after one of the requests. CVE-2026-129514 (CVSS v4 10.0, CWE-502) sits in the parser for application/vnd.hex+erlang request bodies: Plug.Crypto.non_executable_binary_to_term/2 refuses functions and new atoms but leaves maps unchecked, and because the endpoint decodes bodies before routing or authentication runs, any unauthenticated POST sent with that content type reached the decoder on every route. A forged Elixir struct then raised an error whose reporting called inspect on attacker-chosen data, letting the attacker steer execution through Ecto.Query.DynamicExpr and DBConnection.Stream into an apply/3 call on an attacker-supplied {module, function, args} tuple — commands running as the BEAM user, whose environment carries the database, storage and registry-signing credentials. Git history shows the safety check that would have caught this was deleted on February 23, 2016, so the service has been exploitable for a decade; the fix, commit 379b0a2, changes the decoder so a __struct__ map anywhere in a decoded term now produces a 400, and the whole hex.pm fleet was running that build by 18:31 UTC, roughly 15 minutes after the first malicious request arrived. Everything the maintainers could verify came back clean — no modified packages, no database writes, no lingering access; all 23 releases published during the attack line up with the audit log — but database reads are not logged, so email addresses, bcrypt password hashes, API-key hashes, 2FA secrets, session data and audit logs may have been read, and reads of private packages and docs cannot be ruled out entirely. Session and access-token signing keys were replaced, which is why everyone has been logged out. What to do: the reset advice targets hex.pm account holders — people who never registered and only download public packages have nothing to reset, a maintainer clarified. Change your hex.pm password, and reset 2FA at hex.pm/dashboard/security (set up a new authenticator entry and store the new recovery codes) if you had it enabled, then log back in with mix hex.user auth (or rebar3 hex user auth for Erlang projects); update the Hex client when the release with the new registry-signing system ships in the coming days — until then fetch packages only from repo.hex.pm, not third-party mirrors, since the registry signing key itself had not yet been replaced. API keys need no rotation, per the maintainers: those secrets are 128-bit random values that hex.pm never keeps in the clear — only HMAC-SHA256 digests of them — which the team puts far beyond brute-force reach. The team reported the personal data breach to Sweden’s IMY, CISA and ENISA on November 23; watch for phishing, since exposed email addresses may be misused. And because the bug lives in the hexpm server rather than the Hex client, anyone self-hosting a copy of the registry is affected until they deploy the fix. Related library fixes published November 24 for the same untrusted-struct pattern: ash 3.38.0 (CVE-2026-124283), db_connection 2.10.3 (CVE-2026-133555) and flop 0.26.7/0.27.3/0.28.1/0.29.2 (CVE-2026-130411).
References: