hex.pm registry deserialization breach
Unattributed attacker turned a ten-year-old hex.pm parser flaw into command execution on six registry servers
Posted · Spectrum Delta Research Team
Summary
An unattributed attacker ran operating system commands on six hex.pm web servers on November 23, 2026 by exploiting a ten-year-old deserialization flaw (CVE-2026-129514) in the Elixir and Erlang registry, and hex.pm cannot rule out exposure of email addresses, password hashes, API key hashes, 2FA secrets and sessions (hex.pm, A/1). The attacker sent 69 unauthenticated crafted Erlang term POSTs in 13 minutes; the request parser ran before routing and authentication, so a map with a __struct__ key became an attacker-chosen struct, and error logging dispatched protocol implementations until a request-supplied db_connection :log tuple ran a command as the BEAM user (hex.pm, A/1). hex.pm blocked the traffic and replaced every server with a patched build by 18:31 UTC, verified no package or database changes across 23 releases and 186 registry files, but database reads and shell commands were not logged (hex.pm, A/1). The flaw dates to a safety-check removal on February 23, 2016, and the attacker downloaded hex.pm dependencies since November 19, suggesting a local replica was built; users were told to reset passwords and 2FA and use only repo.hex.pm, not mirrors (hex.pm, A/1; NVD, B/2).
Breakdown
Targets
Organizations
- Organization: hex.pm
Technical exposure
- Unauthenticated RCE in the hex.pm request parser since February 23, 2016
- Erlang term body parser ran before routing and authentication on any route
- Database reads, environment-variable reads and shell commands were not logged
- Registry signing key not yet rotated; new signing system still pending
- Account email addresses, password hashes and 2FA secrets exposure not ruled out
Adversary
Unattributed · no attribution offered by hex.pm or CISA (A/1)
Procedures (4)
Attacker downloaded hex.pm dependencies to build a local test replica
Logs
- CDN and package storage access logs · Repeated dependency downloads: two addresses fetching hex.pm's own dependencies since November 19; mirror-like bulk pulls from one client
Sent 69 unauthenticated crafted Erlang term POSTs to hex.pm
- T1190Exploit Public-Facing Application
Logs
- hex.pm load-balancer and web server access logs · POST requests with Content-Type application/vnd.hex+erlang from two addresses, 69 requests 18:16-18:29 UTC November 23; HTTP 400 rejections after the 18:31 patch; firewall denials from 18:33:48
__struct__ maps decoded into attacker-chosen structs before authentication
Logs
- Sentry application error logs · UndefinedFunctionError on fetch/2 for _method override; Ecto.Query.DynamicExpr and DBConnection.Stream structs in stack traces; one error per malicious request
db_connection :log tuple executed OS commands as the BEAM user
- T1059.004Command and Scripting Interpreter: Unix Shell
Logs
Web server process and file events · File created 3 ms after a request (first at 18:16:46); OS command execution as the BEAM process user on six web servers; no shells in later process listings
- Web server network flow logs · Outbound traffic spike: one worker server peaked at 0.47 MB/s versus a usual 0.29 MB/s maximum
Indicators of compromise
CVEs (3)
- CVE-2026-129514CVSS 10.0 unauthenticated deserialization RCE in the hex.pm Erlang term request parser, exploited in the wild on 2026-11-23; affected hexpm ab1bbce to 379b0a2
- CVE-2026-124283same struct class flaw in Ash keyset pagination cursors, fixed in ash 3.38.0 on 2026-11-24
- CVE-2026-133555db_connection applies request-supplied :log tuples from stream structs, used for command execution
Sources
- A/1Hex: Security incident on hex.pm
- B/2NVD: CVE-2026-129514
- B/2SecurityWeek: Hex Package Manager Warns of Potential Data Breach
Grades are source reliability (A–F) and information credibility (1–6).
Questions, detections or sightings of hex.pm registry deserialization breach? Bring them to the community.