News Application Security
Hex.pm: attackers ran commands on six registry servers via a pre-auth parser flaw
The Hex team says an unauthorized party exploited an unauthenticated remote code execution flaw in hex.pm, the Erlang and Elixir package registry. Package integrity checks came back clean, but Hex cannot rule out database reads, and the registry signing key has not yet been rotated.

Key takeaways
- CVE-2026-129514 is an unauthenticated remote code execution flaw in the hex.pm registry server, in a body parser that ran before routing and authentication.
- Hex counts 69 malicious requests across six web servers and says it blocked traffic and deployed a fix within 20 minutes.
- Package integrity was checked against audit logs and the database, and Hex found no evidence of tampering.
- Database reads are not logged, so access to account data cannot be ruled out, and the registry signing key has not yet been rotated.
- Hex users should change passwords, reset 2FA and fetch only from repo.hex.pm until the new signing system ships.
The team behind hex.pm, the package registry for Erlang and Elixir, has disclosed that an unauthorized third party executed commands on its web servers on 23 November. The disclosure is unusually specific about what was verified and what was not, which makes it worth reading closely.
The flaw #
The bug is tracked as CVE-2026-129514 and GHSA-9pmm-hf4r-27pg, classed as CWE-502 (deserialization of untrusted data) with the maximum CVSS score of 10.
Per the GitHub advisory, the registry accepted request bodies in an Erlang term format, content type application/vnd.hex+erlang. The decoder relied on a function meant to reject executable terms, but that function still accepts maps with a __struct__ key. Hex describes a chain through Ecto and DBConnection structs that ends in operating system command execution as the BEAM process user.
The detail that matters most: the parser "runs in the endpoint before routing and authentication." No account was needed. The advisory's affected range for hex.pm reaches back more than a decade. The fix rejects any map carrying a __struct__ key and returns a 400 response.
The incident #
Hex counts 69 malicious requests between 18:16 and 18:29 UTC, touching six web servers. Six, because a restart during the attack brought up three new servers still running the vulnerable build. "We blocked the traffic and deployed a fix within 20 minutes," the team writes.
What held, and what is unknown #
Hex states: "We found no evidence of unauthorized package modifications, or database changes, or that the attacker maintained access". That rests on checks, not assumption. All 23 releases published during the incident match the audit log, no older release changed, and the package and registry files written in the window match the database.
The limits are stated just as plainly. The advisory notes the application environment holds the database URL, storage credentials and the registry signing key. Database reads are not logged, so Hex cannot rule out access to email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs. Private package reads cannot be fully ruled out either. All credentials were rotated "except the registry signing key and a few low-impact secrets."
None of this means data or the signing key was taken. It means the evidence cannot exclude it.
What users should do #
Hex's guidance:
- Change your hex.pm password.
- Reset 2FA and store new recovery codes.
- Update the Hex client when the release with the new signing system ships.
- Until then, fetch only from repo.hex.pm, not from mirrors.
Hex says API keys do not need rotation. Everyone was logged out when session and token signing keys were replaced.
The Hacker News reports that the flaw sits in the hexpm server code, not the Hex client, and that self-hosted copies of the registry are affected until patched.
The appsec takeaway: a "safe" deserializer is only as safe as the types it lets through, and anything that parses input before authentication deserves the hardest review in the codebase.
Sources
- Security incident on hex.pm, Hex
- Unauthenticated remote code execution through struct values in Erlang term request bodies, GitHub Security Advisories (hexpm/hexpm)
- Hackers Exploited CVSS 10.0 Hex.pm RCE Flaw to Compromise 6 Package Registry Servers, The Hacker News
Questions this raises
- Were any Hex packages tampered with?
- Hex says it found no evidence of unauthorized package modifications. All 23 releases published during the incident match the audit log, no older release changed, and files written in the window match the database.
- Was account data or the signing key stolen?
- Hex has not said so. It says it cannot rule out that account data was accessed because database reads are not logged, and the vulnerable process had the signing key in its environment. The signing key has not yet been rotated.
- Do I need to rotate my Hex API keys?
- Hex says API keys do not need rotation. It does ask users to change their password, reset 2FA and store new recovery codes.