Threat reportVulnerabilityTL-2026-6845
Hex.pm Unauthenticated RCE (CVE-2026-129514, CVSS 10.0) Exploited to Compromise 6 Package Registry Servers
An unauthenticated remote code execution flaw in hexpm's Erlang-term request body decoder was exploited on 2026-11-23 to run OS commands on six production hex.pm web servers. A map with a __struct__ key chains through Ecto and DBConnection error handling into an attacker-chosen {module, function, args} call.
Key facts
| Identifiers | TL-2026-6845, CVE-2026-129514, CVE-2026-133555, CVE-2026-124283, CVE-2026-130411 |
|---|---|
| Also known as | GHSA-9pmm-hf4r-27pg, Hex.pm security incident of 2026-11-23 |
| Severity | CRITICAL |
| CVSS | 10 (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:A) |
| First disclosed | |
| Affected products | Hex (hexpm) hexpm server (hex.pm registry, HexpmWeb.PlugParser / HexpmWeb.ErlangFormat); Ash Framework ash; Elixir Ecto db_connection; flop flop |
| Weaknesses (CWE) | CWE-502 |
| MITRE ATT&CK techniques | T1005 Data from Local System, T1059 Command and Scripting Interpreter, T1190 Exploit Public-Facing Application, T1552 Unsecured Credentials, T1595 Active Scanning |
| Motivation | UNKNOWN |
| Target sectors | technology, software-development, open-source |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 12 cited sources |
Detection coverage
As of 2026-11-25, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-6845 across Splunk SPL, Microsoft KQL and Sigma, covering 9 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: hexpm Erlang-Term POST Error Burst — Probing and Exploitation (CVE-2026-129514)
Counts 400/500 responses to application/vnd.hex+erlang POSTs per source IP in 5 minute windows. Exploit requests on vulnerable builds surface as a normal 500 (the error is rescued), and as 400 after fix commit 379b0a29 rejects __struct__ maps; the same two attacker addresses had probed hex.pm since about 2026-11-19 before 69 exploit requests on 2026-11-23.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1190, T1595, T1595.002
- Data sources: nginx:access (index=web), reverse_proxy_logs
- Severity: high
- Confidence: medium
Splunk SPL
index=web sourcetype="nginx:access" http_method=POST content_type="application/vnd.hex+erlang*" status IN (400,500) earliest=-24h
| bin _time span=5m
| stats count as err_requests dc(uri_path) as distinct_routes values(status) as statuses by src_ip, host, _time
| where err_requests>=5
| eval note="CVE-2026-129514 hexpm exploit/probe burst: 400 = patched build rejecting __struct__, 500 = vulnerable build rescued error"
| sort - err_requestsMicrosoft KQL
// CVE-2026-129514 burst of 400/500 responses to vnd.hex+erlang POSTs (probe/exploit attempts; incident saw 69 requests in 13 minutes)
NginxAccess_CL
| where TimeGenerated > ago(24h)
| where HttpMethod_s =~ "POST" and ContentType_s startswith "application/vnd.hex+erlang" and Status_d in (400, 500)
| summarize ErrRequests=count(), Routes=dcount(UriPath_s), Statuses=make_set(Status_d) by ClientIP_s, Computer, bin(TimeGenerated, 5m)
| where ErrRequests >= 5
| order by ErrRequests descSigma
title: hexpm Burst of Erlang-Term POST Errors (CVE-2026-129514)
id: 7c1e5a52-3f0b-4d6e-9a41-6845a0000002
status: experimental
description: Detects POST requests with Content-Type application/vnd.hex+erlang answered with 400 or 500, indicating exploit or probe attempts against HexpmWeb.PlugParser. Aggregate by source IP (>=5 in 5 minutes) in the SIEM.
references:
- https://hex.pm/blog/security-incident-on-hexpm
- https://github.com/hexpm/hexpm/security/advisories/GHSA-9pmm-hf4r-27pg
- https://github.com/hexpm/hexpm/commit/379b0a29bcc95164249f38ad7d772a37a8ff9533
author: Threadlinqs Team
date: 2026/11/25
tags:
- attack.reconnaissance
- attack.t1595
- attack.t1595.002
- attack.initial-access
- attack.t1190
- cve.2026.129514
logsource:
category: webserver
detection:
selection:
cs-method: 'POST'
c-content-type|startswith: 'application/vnd.hex+erlang'
sc-status:
- 400
- 500
condition: selection
falsepositives:
- Buggy or misconfigured Hex client/mirror repeatedly posting malformed bodies
- Load or fuzz testing in staging
level: medium
Known false positives:
- Misbehaving Hex client or mirror retrying malformed requests
- Staging load tests
Tuning notes: Tune the threshold (>=5 per 5 minutes) to your baseline. On patched servers any 400 to this content type is suspicious; on unpatched servers a 500 is the exploit signature because the error path is rescued. Allow-list known CI egress IPs. Pivot source IPs against activity from 2026-11-19 onward (repeated dependency downloads suggest attacker staging).
- hexpm UndefinedFunctionError fetch/2 Struct Gadget in App Logs — Exploitation (CVE-2026-129514) · unlock with TL Creds
- BEAM VM Child Fetch/Reverse-Shell Command — Post-Exploitation (CVE-2026-129514) · unlock with TL Creds
- BEAM VM Child Harvesting Environment Secrets — Credential Access (CVE-2026-129514) · unlock with TL Creds
- hexpm DynamicExpr/DBConnection.Stream Gadget Terms in Logs — Exploitation (CVE-2026-129514) · unlock with TL Creds
- Unexpected BEAM VM Child Process — Post-Exploitation (CVE-2026-129514) · unlock with TL Creds
- BEAM VM Child External Connection — Exfiltration/Staging (CVE-2026-129514) · unlock with TL Creds
- hexpm Unauthenticated application/vnd.hex+erlang POST — Exploitation (CVE-2026-129514) · unlock with TL Creds
- BEAM VM Child Shell or Downloader — Post-Exploitation Execution (CVE-2026-129514) · unlock with TL Creds
Indicators of compromise
As of 2026-11-25, Threadlinqs Intelligence tracks 9 indicators of compromise for TL-2026-6845.
Sample indicators (2 of 9)
- File hash:
379b0a29bcc95164249f38ad7d772a37a8ff9533 - File hash:
ab1bbcef7cc8395d1056d3b1aa6a174353492d59
Defanged, TLP:CLEAR. Full set of 9 indicators: unlock with TL Creds.
Technical analysis
No package modification was found, but database reads cannot be ruled out.
On Monday 2026-11-23 an unauthorized third party exploited a flaw in the hexpm server (the software behind the hex.pm package registry for Elixir/Erlang/Gleam) and executed OS commands on six production web servers. Hex.pm's incident report (2026-11-24) records 69 exploit requests from two source addresses between 18:16 and 18:29 UTC. The first exploit request arrived at 18:16:00 UTC, the first file created by the exploit on a server at 18:16:46, and the last exploit request reached a server at 18:29:33. A firewall block was added at 18:27, and all web, worker and job servers were replaced with the patched build by 18:31 UTC. A restart at 18:28 brought up three new servers still running the vulnerable build, which is why six servers were hit. The same two addresses had been active since about 2026-11-19, repeatedly downloading hex.pm's dependencies, which the Hex team reads as the attacker building a local copy to test against.
Root cause (GHSA-9pmm-hf4r-27pg, CWE-502): a custom parser (HexpmWeb.PlugParser, using HexpmWeb.ErlangFormat.decode/1) handles the application/vnd.hex+erlang content type with Plug.Crypto.non_executable_binary_to_term/2 and the [:safe] option. It runs in the endpoint before routing and authentication, so any unauthenticated POST to any route reaches it. [:safe] rejects functions and new atoms but does not restrict maps, so a map with a __struct__ key is accepted as a struct. The relevant safety check was removed on 2016-02-23, so the flaw existed from then until the fix.
Exploit chain: (1) Plug.MethodOverride reads body_params["_method"]; on a struct this calls fetch/2 on the struct's module. The attacker chose Ecto.Query.DynamicExpr, which has no fetch/2, so an UndefinedFunctionError is raised with the attacker's struct in the stack trace. (2) Error reporting (Sentry, Bandit's error log, the JSON log formatter) calls inspect on that data. The Inspect implementation for DynamicExpr calls Enum.map/2 on the binding field without checking that it is a list. (3) The binding field holds a DBConnection.Stream struct, whose Enumerable implementation calls DBConnection.reduce/3 and then declare/4. (4) On the error path the stream's :log option is still applied; a {module, function, args} tuple from the request is run as apply(mod, fun, [entry | args]). The attacker therefore controls module, function and arguments, and can call an OTP standard-library function that applies a trailing module/function/args list, running an OS command as the BEAM process user. The Inspect call runs inside a rescue, so the client just sees a normal 500 response. The commands run and the files created were not disclosed.
Impact: the BEAM user can read the application environment, which per the advisory holds the database URL, storage credentials and the registry signing key. The Hex team found no evidence of package modification, database writes, or persistent access, and found no shells in the process list of affected servers. Because database reads are not logged, they cannot rule out access to email addresses, password hashes (bcrypt), API key hashes (HMAC-SHA256 of random 128-bit values), 2FA secrets, sessions and audit logs. Verification: 23 releases published during the incident match the audit log, 62 package files and 186 registry files written since 18:00 match database contents, and a database copy taken at 18:13:59 UTC was compared row by row to the live database. Remediation by Hex included rotating storage, CDN, email and database credentials and session/token signing keys (logging out all users and clients), deactivating the AWS key used by the affected servers, and a hardening pass in plug_crypto, plug, ecto and db_connection. The registry signing key and a few low-impact secrets had not been rotated at the time of the report; a new registry signing system with key rotation is being built. Users were asked to change passwords and reset 2FA.
Related library CVEs named in the coverage: CVE-2026-133555 (db_connection, the :log callback on stream structs; not exploitable in db_connection alone), CVE-2026-124283 (ash 3.31.3 up to 3.38.0, requires keyset pagination with a client-supplied cursor, certain sort field types and an unset default signing secret) and CVE-2026-130411 (flop, similar conditions around pagination cursors). Attribution is unknown; no attacker IP addresses, user agents, hashes or malware names were published. Self-hosted hexpm registry copies are affected until they deploy the fix.
MITRE ATT&CK techniques by tactic:
Collection
Execution
T1059 Command and Scripting Interpreter
Initial Access
T1190 Exploit Public-Facing Application
Credential Access
Reconnaissance
Remediation
Patches
- hexpm/hexpm commit 379b0a29bcc95164249f38ad7d772a37a8ff9533 (Refuse structs in Erlang term request bodies); hex.pm service patched 2026-11-23
- ash 3.38.0
- db_connection 2.10.3
- flop 0.26.7 / 0.27.3 / 0.28.1 / 0.29.2
Immediate actions
- Self-hosted hexpm operators: deploy hexpm commit 379b0a29bcc95164249f38ad7d772a37a8ff9533 or later, which rejects any decoded term containing a map with a __struct__ key (HTTP 400)
- Hex.pm users with an account: change your hex.pm password and reset 2FA at hex.pm/dashboard/security (Authenticator App > Setup New App)
- Log back in to Hex clients after the forced logout: mix hex.user auth, or rebar3 hex user auth
- Rotate the database URL, storage/CDN/email credentials, session and token signing keys, and the registry signing key on any self-hosted instance that may have run a vulnerable build
- Treat email links claiming to be from Hex with suspicion; forward suspicious mail to security@hex.pm
Workarounds
- No workaround is published in the advisory or commit. Where patching is delayed, block or reject unauthenticated POST requests with Content-Type application/vnd.hex+erlang at a reverse proxy or WAF (defender suggestion, not from the vendor)
Longer-term hardening
- Update Hex client, rebar3 and Gleam when the new Hex releases ship; until then use only repo.hex.pm, not mirrors
- Upgrade ash to 3.38.0 or later (CVE-2026-124283), db_connection to 2.10.3 or later (CVE-2026-133555), and flop to 0.26.7, 0.27.3, 0.28.1, 0.29.2 or later on its branch (CVE-2026-130411)
- Adopt the hardening releases of plug_crypto, plug and ecto that refuse struct values from untrusted terms
- Do not decode untrusted payloads with binary_to_term, even with [:safe]; prefer a non-Erlang-term wire format on unauthenticated paths
- Log database reads on sensitive tables and restrict secrets visible in the application environment
Affected and fixed versions
- Hex (hexpm) — hexpm server (hex.pm registry, HexpmWeb.PlugParser / HexpmWeb.ErlangFormat)
Vulnerable versions: Commits from ab1bbcef7cc8395d1056d3b1aa6a174353492d59 (2016-02-23) up to but not including 379b0a29bcc95164249f38ad7d772a37a8ff9533; hex.pm service before 2026-11-23
Fixed in: 379b0a29bcc95164249f38ad7d772a37a8ff9533 - Ash Framework — ash
Vulnerable versions: 3.31.3 up to but not including 3.38.0 (CVE-2026-124283)
Fixed in: 3.38.0 - Elixir Ecto — db_connection
Vulnerable versions: 1.1.0 up to but not including 2.10.3 (CVE-2026-133555)
Fixed in: 2.10.3 - flop — flop
Vulnerable versions: From 0.8.0, each branch before its fixed version (CVE-2026-130411)
Fixed in: 0.26.7; 0.27.3; 0.28.1; 0.29.2
Timeline
- The safety check in hexpm's request decoder was removed (introducing commit locked-ioc-2); the flaw persisted until 2026-11-23.
- Approximately from this date the two attacker source addresses were active, repeatedly downloading hex.pm's dependencies, which the Hex team reads as the attacker building a local copy to test against.
- Personal data breach reported to IMY (Swedish data protection authority) at 22:58 UTC, CISA at 23:05 UTC and ENISA (early warning) at 23:26 UTC.
- Most infrastructure credentials rotated by 20:21 UTC; a security report describing the same vulnerability was received at 19:07 UTC.
- 18:30-18:31 UTC: all hex.pm web, worker and job servers replaced with the patched build (fix commit 379b0a29); 18:49 UTC the AWS access key used by the affected servers was deactivated.
- 18:29:33 UTC: last exploit request reached a server (69 exploit requests in total between 18:16 and 18:29); none succeeded afterward.
- 18:27 UTC: firewall rule added to block attacker traffic; at 18:28 a restart brought up three new servers still on the vulnerable build, so six servers were affected in total.
- 18:16:00 UTC: first exploit request (first request of any kind from the attacker addresses was at 18:14:21); the first file was created on a server at 18:16:46 UTC.
- By 10:42 UTC every credential the attacker could have read, including the database password, had been rotated, except the registry signing key and a few low-impact secrets.
- Hex.pm published its incident report and GHSA-9pmm-hf4r-27pg; CVE-2026-129514 was published (blog: 13:48 UTC; NVD: 14:18 UTC). Ash 3.38.0 and fixes for db_connection and flop were released the same day.
- The Hacker News reported the CVSS 10.0 exploitation of hex.pm; new Hex client releases were expected within days.
Sources cited
- Hex.pm incident report: Security incident on hex.pm hex.pm · Advisory · 2026-11-24
- hexpm GitHub security advisory GHSA-9pmm-hf4r-27pg GitHub · Advisory · 2026-11-24
- NVD: CVE-2026-129514 NVD (NIST) · Advisory · 2026-11-24
- EEF CNA record: CVE-2026-129514 cna.erlef.org · Advisory · 2026-11-24
- OSV: EEF-CVE-2026-129514 osv.dev · Advisory · 2026-11-24
- EEF CNA record: CVE-2026-133555 (db_connection) cna.erlef.org · Advisory · 2026-11-24
- db_connection advisory GHSA-gmmq-fw75-wq46 GitHub · Advisory · 2026-11-24
- EEF CNA record: CVE-2026-124283 (ash) cna.erlef.org · Advisory · 2026-11-24
- EEF CNA record: CVE-2026-130411 (flop) cna.erlef.org · Advisory · 2026-11-24
- hexpm fix commit 379b0a29 - Refuse structs in Erlang term request bodies GitHub · Code repository · 2026-11-23
- Elixir Forum: Hex.pm security incident (maintainer clarifications) forum.elixirforum.com · Blog · 2026-11-24
- The Hacker News: Hackers Exploited CVSS 10.0 Hex.pm RCE The Hacker News · News · 2026-11-25
Drafted by the Threadlinqs research pipeline from 12 sources; published ; last updated —.