CVE-2026-129514: hexpm · Unsafe deserialization
Exploitation: Public exploit · CVSS 10.0 Critical · Unauthenticated · Published 2026-11-24
Description
Deserialization of Untrusted Data vulnerability in the application/vnd.hex+erlang request body parser in hexpm hexpm allows an unauthenticated remote attacker to execute operating system commands via a crafted Erlang external term format request body. This vulnerability was actively exploited against the hex.pm service on 2026-11-23. HexpmWeb.ErlangFormat.decode/1 in lib/hexpm_web/erlang_format.ex decodes the body with Plug.Crypto.non_executable_binary_to_term/2, which accepts maps that have a __struct__ key. HexpmWeb.PlugParser.parse/5 returns the decoded term as the request params. The parser runs in the endpoint before routing and authentication, so a POST to any route reaches it. Elixir dispatches protocols on the __struct__ key, so the client selects which Inspect and Enumerable implementations run when error reporting inspects the params. A chain through Ecto.Query.DynamicExpr and DBConnection.Stream reaches an apply/3 call on a {module, function, args} tuple taken from the request body. This issue affects hex.pm: from 2016-02-23 before 2026-11-23; hexpm/hexpm: from ab1bbcef7cc8395d1056d3b1aa6a174353492d59 before 379b0a29bcc95164249f38ad7d772a37a8ff9533.
Enclave's analysis
A deserialization flaw in hexpm's Erlang-term body parser lets anyone POST a crafted request to any route and run OS commands, no login needed. It was actually exploited against the live hex.pm service in November 2026; hex.pm caught it within 20 minutes, patched, and rotated credentials. The exploit chain is intricate but already proven to work end-to-end against production. Self-hosted hexpm/hexpm instances must upgrade past the fix commit now.
Fix
Upgrade hex.pm hosted service to patched in production 2026-11-23; hexpm/hexpm (self-hosted deployments) to 379b0a29bcc95164249f38ad7d772a37a8ff9533. No fixed version is listed for hexpm; follow the vendor advisory.
Affected versions
| Product | Vulnerable | Fixed in |
|---|---|---|
| hexpm | 2016-02-23 before 2026-11-23 | Not listed |
| hexpm | ab1bbcef7cc8395d1056d3b1aa6a174353492d59 before 379b0a29bcc95164249f38ad7d772a37a8ff9533 | Not listed |
| hex.pm hosted service | 2016-02-23 until the 2026-11-23 patch | patched in production 2026-11-23 |
| hexpm/hexpm (self-hosted deployments) | commit ab1bbcef7cc8395d1056d3b1aa6a174353492d59 up to before 379b0a29bcc95164249f38ad7d772a37a8ff9533 | 379b0a29bcc95164249f38ad7d772a37a8ff9533 |