Hex.pm RCE breach: attackers ran commands on six web servers via CVE-2026-129514
Severity: critical · Patch status: patched · Since 2026-11-24 · CVE-2026-124283, CVE-2026-129514
On 2026-11-23 an unauthorized third party exploited CVE-2026-129514 against hex.pm, the package registry for Erlang and Elixir, and ran operating-system commands on six web servers. The attack was a burst of 69 requests between 18:16 and 18:29 UTC. The root cause is an unauthenticated request-body parser that used Plug.Crypto.nonexecutablebinarytoterm/2, which accepts maps carrying a struct key. An attacker-built struct could be chained through error-reporting inspect calls and a DBConnection stream's log option into apply on an attacker-supplied {module, function, args} tuple. Hex's own timeline says the safety check was removed on 2016-02-23. Hex blocked the traffic and deployed a patched build within about 20 minutes, then rotated the storage, CDN, email, database and session-signing secrets and logged out all users. Hex reports no unauthorized package changes and no unexpected database writes, but database reads are not logged, so it cannot rule out exposure of email addresses, password and API-key hashes, 2FA secrets, sessions and audit logs, and it cannot fully rule out reads of private packages. It reported a personal-data breach to Sweden's IMY and notified CISA and ENISA. A related keyset-pagination flaw in the Ash framework (CVE-2026-124283) was fixed in Ash 3.38.0 on 2026-11-24. Users should change their Hex password, reset 2FA, treat Hex-looking emails with suspicion, use only repo.hex.pm until the new client is out, and upgrade Ash.
What to do
- Change your Hex.pm password and reset 2FA at hex.pm/dashboard/security: choose Setup New App under Authenticator App, verify the new entry, and store the new recovery codes
- Until the new Hex client with the new registry signing system is released, fetch packages only from repo.hex.pm, not third-party mirrors; then run mix local.hex --force (and update rebar3 or Gleam if you use them)
- Treat emails that claim to come from Hex with suspicion; check that every link leads to hex.pm, and forward doubtful mail to security@hex.pm
- Review whether private packages or documentation you publish could have been read during the incident window; contact support@hex.pm if you think they were
- If you use the Ash framework, upgrade to Ash 3.38.0 or later
Fixed versions
- hexpm/hexpm commit 379b0a29 (deployed to every hex.pm server by 18:31 UTC on 2026-11-23; service-side)
- ash 3.38.0 (CVE-2026-124283, released 2026-11-24)
Sources
All live incidents on Threat Watch