Hex.pm remote code execution in Erlang term body parser
- Exploited
- No known exploitation
- Fix
- Fixed in 2026-11-23
- Who is exposed
- Default setups
Summary
The hexpm software, including the hex.pm service and the hexpm/hexpm project, has a deserialization flaw that lets a remote attacker run operating system commands without logging in. The attacker sends a crafted Erlang external term format request body to the application/vnd.hex+erlang parser, which runs before routing and authentication, so any POST request can reach it.
Written by a model
Original 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.
Who should check
Anyone running hexpm/hexpm (the hex.pm registry codebase) at commits from ab1bbce before 379b0a2.
“hexpm/hexpm: from ab1bbcef7cc8395d1056d3b1aa6a174353492d59 before 379b0a29bcc95164249f38ad7d772a37a8ff9533”
What to do
Check every install: default setups are affected.
Upgrade to a fixed version: 2026-11-23.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-129514 (Unauthenticated remote code execution through struct values in Erlang term request bodies), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-129514 (entry last updated 2026-11-24):
Affected:
- Hex package hex.pm: from 2016-02-23, fixed in 2026-11-23
- hexpm hexpm: version range not reported
Fixed versions: 2026-11-23.
Conditions (all must be true for the bug to be hit):
- Request uses the application/vnd.hex+erlang content type (source: https://cna.erlef.org/cves/CVE-2026-129514.html)
- Affected hexpm/hexpm commits from ab1bbce before 379b0a2 (source: https://cna.erlef.org/cves/CVE-2026-129514.html)
Setup: the bug is reachable in a default setup; no special feature or setting is needed.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-129514 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-129514 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Packages (Hex): find every lockfile in each project and run the stack.check operation of the cve.now MCP server (execute) on each one. Compare the resolved versions, not the ranges a manifest declares, with the affected versions above. Include transitive dependencies.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/hexpm/hexpm/security/advisories/GHSA-9pmm-hf4r-27pg
- https://github.com/hexpm/hexpm/commit/379b0a29bcc95164249f38ad7d772a37a8ff9533
- https://cna.erlef.org/cves/CVE-2026-129514.html
- https://osv.dev/vulnerability/EEF-CVE-2026-129514
- https://hex.pm/blog/security-incident-on-hexpm
- https://github.com/hexpm/hexpm/commit/ab1bbcef7cc8395d1056d3b1aa6a174353492d59
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-129514
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-129514"}.Affected versions
- hex.pmFrom 2016-02-23 · fixed in 2026-11-23
- hexpm/hexpmVersion range not reported
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure22/25Default setups, reachable over the network without a login
- Reach10/20Affects Hex packages
- Severity10/10CVSS 10.0
- No patch0/5No signal
What would change the score
- Would score about 82 if added to CISA KEV
- Would score about 77 if CISA's SSVC rates exploitation active
Timeline
- CVE published
- First seen by cve.now
- Posted on X by cve.now
- Record last updated
Evidence 8
| Kind | Source |
|---|---|
| Vendor advisory 2Establishes: Affected and fixed versions. | |
| Advisory | GitHub · hexpm/hexpm · Advisory GHSA-9pmm-hf4r-27pg |
| Link | hex.pm · blog/security-incident-on-hexpm |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-129514 |
| Record | NVD · CVE-2026-129514 |
| Other links 4 | |
| Patch | GitHub · hexpm/hexpm · Commit 379b0a29 |
| Repository | GitHub · hexpm/hexpm · Commit ab1bbcef |
| Link | cna.erlef.org · cves/CVE-2026-129514.html |
| Link | osv.dev · vulnerability/EEF-CVE-2026-129514 |
Questions about CVE-2026-129514
Is CVE-2026-129514 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
What does this mean?
A request sent with the Erlang term content type that contains struct values can let an unauthenticated attacker run operating system commands as the user of the BEAM process.
Source: cna.erlef.org
Which versions are affected by CVE-2026-129514?
hex.pm (Hex): from 2016-02-23 before 2026-11-23.
Source: cve.now feed data
Am I affected, and how do I check?
The affected code is hexpm/hexpm from commit ab1bbce before commit 379b0a2, and the issue applies only to requests that use the application/vnd.hex+erlang content type. To check a deployment, compare the deployed hexpm/hexpm commit against that range.
Source: cna.erlef.org
How do I fix CVE-2026-129514?
The checked facts do not name a fixed version or vendor patch identifiers, so no upgrade target can be given here. Consult the vendor's advisory for the fix.
Source: cna.erlef.org
Related
- CVE-2026-21622Password Reset Tokens Do Not Expire
- CVE-2026-21618Cross-site scripting (XSS) in OAuth Device Authorization screen
- CVE-2026-75542OAuth token exchange grants repository scopes for organizations the principal cannot access
- CVE-2026-23940Denial of Service via Oversized Package Upload
- CVE-2026-21621Improper Scope Enforcement in OAuth client_credentials Flow Allows Read-Only API Key to Escalate to Full Access
- CVE-2026-86698Refresh tokens accepted as private repository credentials at the CDN
No corrections so far. Something wrong on this page? Report an error.