Unauthenticated remote code execution through struct values in Erlang term request bodies
- State
- Published
- Severity
- 10.0 Critical
- Published
- Nov 24, 2026
- Updated
- Nov 30, 2026
- Reserved
- Nov 16, 2026
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.
| Product | Versions |
|---|---|
| hexpm hexpm | 2016-02-23 to before 2026-11-23 Affected |
| hexpm hexpm | ab1bbcef7cc8395d1056d3b1aa6a174353492d59 to before 379b0a29bcc95164249f38ad7d772a37a8ff9533 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 10.0 Critical | EEF | |
| 3.1 | 8.8 High | CISA-ADP |
Weaknesses
- CWE-502 Deserialization of Untrusted Data
References
- Unauthenticated remote code execution through struct values in Erlang term request bodiesVendor AdvisoryRelated
- EEF CNA record for CVE-2026-129514Related
- OSV record EEF-CVE-2026-129514Related
- Security incident on hex.pmTechnical Details
- Introducing commit ab1bbce in hexpm/hexpmRelated
- Fix commit 379b0a2 in hexpm/hexpmPatch
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.