Hex.pm package registry breached via CVE-2026-129514 RCE flaw
Attackers used a CVSS 10.0 RCE flaw to run commands on six Hex.pm servers; change your hex.pm password and reset 2FA.
- Published
- Updated
- Ecosystem
- Open sourceWebsites and CMS
- Fixed in
- hex.pm server build 2026-11-23 (fix commit 379b0a2); ash 3.38.0; db_connection 2.10.3; flop 0.26.7, 0.27.3, 0.28.1, 0.29.2
- Exploitation
- Yes, 69 exploit requests against six hex.pm web servers on November 23 per the Hex.pm incident report as relayed by The Hacker News; the GitHub advisory also states active exploitation
Live scores
CVE-2026-129514- EPSS
- 0.032
some chance of attack soon - VEDAS
- 0.971
strong exploit evidence - On CISA KEV
- Not listed
- Detection rule
- Suricata
Live scores
CVE-2026-124283- EPSS
- 0.011
some chance of attack soon - VEDAS
- 0.109
little exploit evidence - On CISA KEV
- Not listed
- Detection rule
- Out of scope (local)
Live scores
CVE-2026-133555- EPSS
- 0.005
low predicted chance of attack - VEDAS
- 0.841
likely exploited - On CISA KEV
- Not listed
- Detection rule
- Out of scope (local)
Live scores
CVE-2026-130411- EPSS
- 0.012
some chance of attack soon - VEDAS
- 0.850
likely exploited - On CISA KEV
- Not listed
- Detection rule
- No public rule yet
What happened
On Monday, November 23, an attacker ran operating system commands on six Hex.pm production servers, according to The Hacker News. The flaw is tracked as CVE-2026-129514 and carries a CVSS score of 10.0.
The hexpm GitHub security advisory describes it as deserialization of untrusted data in the request body parser for the application/vnd.hex+erlang content type:
- The decoder accepted maps with a
__struct__key, so a request body could pose as an Elixir struct. - The parser runs before routing and authentication, so a POST to any route could reach it.
- The advisory traces a chain through error reporting,
Ecto.Query.DynamicExprandDBConnection.Stream. It ends in anapply/3call whose module, function and arguments come from the request body, and the resulting commands run as the user of the BEAM process. - That user can read the application environment, which holds the database URL, the storage credentials and the registry signing key.
- The advisory lists affected builds as from 2016-02-23 until 2026-11-23, and says the flaw was actively exploited against hex.pm on 2026-11-23.
The fix makes the decoder reject any term containing a map with a __struct__ key.
Timeline and findings, as reported by The Hacker News from the Hex.pm incident report:
- Load balancer logs show 69 exploit requests between 18:16 and 18:29 UTC, all from two addresses.
- Files created by the exploit appeared on six web servers. Three of those joined mid-attack, when a restart brought up machines still on the vulnerable build.
- Every server was running the fix by 18:31 UTC.
- The 23 releases published during the attack match the audit log, and no older release was changed.
- Database reads, shell commands, environment variables and direct file storage reads were not logged. The team wrote that it “cannot rule out that the attacker accessed data stored in the database”. That database holds email addresses, password hashes, API key hashes, two-factor secrets and session data. Private packages could also have been read without a trace.
- No leftover shells and no new accounts or cloud keys were found. Who was behind the attack is unknown.
- The team reported the breach to the Swedish data protection authority, CISA and ENISA.
Outlets differ slightly on timing. The Hacker News says every server was patched within about 15 minutes of the first malicious request. SecurityWeek and Risky Business News say the fix came within 20 minutes. SecurityWeek adds that servers were replaced at 18:30 and a firewall rule fully blocked the attacker at 18:33. Whether the flaw was exploited before November 23 has not been established, per The Hacker News.
Separate from the attack, maintainers of three Elixir libraries disclosed related flaws involving structs built from untrusted data and shipped fixes (The Hacker News, SecurityWeek). The db_connection advisory says its issue is “not exploitable in db_connection alone”.
Am I affected?
- You have a hex.pm account: yes, act on the steps below. All account holders were logged out after the maintainers replaced the session and token signing keys (The Hacker News).
- You never created a hex.pm account and only fetch public packages: nothing to reset, according to maintainer Peter Ullrich as quoted by The Hacker News. If you signed up with GitHub, log back in to your clients and reset two-factor authentication if you enabled it.
- You run your own copy of the hexpm server: the flaw is in the server code, not the Hex client, so you are affected until you deploy the patch (The Hacker News).
- You use ash, db_connection or flop: these have separate CVEs with their own preconditions. The Hacker News lists the following:
| Library | CVE | Affected | Fixed |
|---|---|---|---|
| ash | CVE-2026-124283 | 3.31.3 up to, but not including, 3.38.0 | 3.38.0 |
| db_connection | CVE-2026-133555 | 1.1.0 up to, but not including, 2.10.3 | 2.10.3 |
| flop | CVE-2026-130411 | From 0.8.0, each branch before its fixed version | 0.26.7, 0.27.3, 0.28.1, 0.29.2 |
Package integrity: no sign of tampering was found. Access to account data: not confirmed either way. Attribution: not confirmed.
What to do now
- Change your hex.pm password. Passwords are hashed with bcrypt, which slows guessing but does not stop it for weak passwords (The Hacker News).
- Reset two-factor authentication by setting up a new authenticator entry, and store the new recovery codes.
- Log back in to your client with
mix hex.user auth, orrebar3 hex user authfor Erlang projects. - You do not need to replace API keys. The team says they are random 128-bit values stored only as HMAC-SHA256 hashes (The Hacker News).
- Fetch packages only from repo.hex.pm and avoid third-party mirrors until the new client ships. The registry signing key had not yet been replaced as of The Hacker News report.
- Update the Hex client when the next release ships. The Hacker News says it was expected within days and brings a new registry signing system. SecurityWeek says Hex is working on a signing system with key rotation support.
- Be careful with emails that claim to come from Hex, since email addresses may have been exposed. Check that any link leads to hex.pm.
- If you operate your own hexpm server, deploy the fix from commit 379b0a2 or later.
- If you use ash, db_connection or flop, check the versions above against your lockfile, and read each project’s advisory for its exploit conditions.
Update, 1 December 2026
- The Hex.pm team says activity from the two attacking addresses goes back to late last week, which suggests the attacker built a local copy of hex.pm to test against. (thehackernews.com)
- A separate security report describing the same flaw arrived by email at 19:07 UTC on Monday, after the attack had ended. (thehackernews.com)
- To check package integrity, the team compared every database table against a copy taken two minutes before the first exploit request and traced each difference to normal activity. The package and registry files written that evening match the database records. (thehackernews.com)
- By the morning after the incident report, the team had replaced every credential the attacker could have read except the registry signing key. (thehackernews.com)
- According to the Ash advisory, the ash flaw (CVE-2026-124283) requires keyset pagination with a client-supplied cursor, certain sort field types, and a signing secret left at its unset default. (thehackernews.com)
Sources
- The Hacker News: Hackers Exploited CVSS 10.0 Hex.pm RCE Flaw to Compromise 6 Package Registry Servers
- GitHub (hexpm): Unauthenticated remote code execution through struct values in Erlang term request bodies
- GitHub (elixir-ecto): Code execution via the :log option of forged DBConnection.Stream structs in db_connection
- SecurityWeek: Hex Package Manager Warns of Potential Data Breach
- Risky Business News: Risky Bulletin: Hackers breach Erlang and Elixir package manager
- SOCRadar: Hex.pm RCE (CVE-2026-129514) Exploited in Server Attack (headline only)
- Security Affairs: Hex.pm Attack Exposes a Flaw Dating Back to 2016 (headline only)
- thehackernews.com: Hackers Exploited CVSS 10.0 Hex.pm RCE Flaw to Compromise 6 Package Registry Servers