NEWS

Hex.pm Says an Attacker Ran Commands on 6 Registry Servers Through a CVSS 10.0 Flaw (CVE-2026-129514)

A 2016-era decoder flaw let one unauthenticated POST run OS commands. Hex.pm says no package changed but database reads can't be ruled out. Reset your password.

Dylan H.

News Desk

November 26, 2026
4 min read
Hex.pm Says an Attacker Ran Commands on 6 Registry Servers Through a CVSS 10.0 Flaw (CVE-2026-129514)

What happened

On Monday, November 23, 2026, an attacker ran operating system commands on six production servers of Hex.pm, the package registry for Elixir and Erlang. The Hacker News reported the details on November 25. The flaw is tracked as CVE-2026-129514 and rated CVSS 10.0.

The flaw

Hex.pm used a parser to read request bodies in an Erlang data format. It ran before routing and authentication, so an unauthenticated POST to any address on the site could reach it.

The decoder blocked dangerous terms such as functions, but it accepted maps with a __struct__ key. A request body could therefore pose as any Elixir struct the application had loaded. A crafted struct caused an error, error reporting then inspected it, and through the Ecto and DBConnection libraries the server called an attacker-chosen function. That ran OS commands with the registry service account's permissions.

The safety check had been removed on February 23, 2016, so the weakness sat in the code for about ten years.

Scope

  • 69 exploit requests arrived between 18:16 and 18:29 UTC, all from two IP addresses.
  • Files created by the exploit appeared on six web servers. Three joined mid-attack after a restart brought up machines still running the vulnerable build.
  • All servers were on the patched build by 18:31 UTC, about 15 minutes after the first malicious request.
  • Activity from the same addresses going back to late the previous week suggests the attacker built a local copy of Hex.pm to test against. Exploitation before Monday has not been established.

Packages and data

The Hex.pm team says no package was changed. It compared database tables against a snapshot taken two minutes before the first exploit request. All 23 releases published during the attack match the audit log, no older release changed, and package files match database records.

The team says it "cannot rule out that the attacker accessed data stored in the database." That data includes email addresses, password hashes, API key hashes, two-factor authentication secrets and session data. Private packages could also have been read without a trace, because database reads, shell commands, environment variables and direct file reads were not logged. The audit logs showed no leftover shells, new accounts or cloud keys.

The attacker is unknown. The breach was reported to the Swedish data protection authority, CISA and ENISA.

Response

Everyone was logged out. Session-signing keys and access-token keys were replaced. By the next morning, all credentials the attacker could have read had been replaced except the registry signing key. A new Hex client, due within days, will bring a new registry signing system. A separate report of the same flaw reached the team by email at 19:07 UTC, after the attack had ended.

These are separate disclosures, not further attacks on Hex.pm. The db_connection advisory says its flaw "is not exploitable in db_connection alone" because another component must first decode untrusted data into structs.

LibraryCVEFixed versions
ashCVE-2026-1242833.38.0
db_connectionCVE-2026-1335552.10.3
flopCVE-2026-1304110.26.7, 0.27.3, 0.28.1, 0.29.2

What to do

  1. If you have a Hex.pm account, change your password and reset two-factor authentication, then store the new recovery codes.
  2. Log back in with mix hex.user auth or rebar3 hex user auth.
  3. Update the Hex client when the next release ships.
  4. Until then, fetch packages only from repo.hex.pm and avoid third-party mirrors.
  5. Watch for phishing, and check that links in Hex-related emails go to hex.pm.
  6. Update ash, db_connection and flop to the versions above.
  7. If you run your own registry from the Hex.pm code, deploy the patch.

According to the team, API keys do not need to be replaced. Developers who only fetch public packages and never created an account have nothing to reset. The advisory is GHSA-9pmm-hf4r-27pg.

Source