For 13 minutes on the evening of Nov. 23, someone had a foothold inside Hex.pm, the central package registry for the Elixir and Erlang ecosystems. The maintainers say the attacker sent 69 malicious requests between 18:16 and 18:29 UTC. Those requests reached six production web servers and ran operating-system commands on them. A patched build was deployed between 18:30 and 18:31 UTC, shortly after the last malicious request.

The bug they used, now tracked as CVE-2026-129514, had been in the registry's code since February 2016. It carries a CVSS v4.0 base score of 10.0, the highest possible. That score comes from the CNA, the body that issued the CVE. NIST's National Vulnerability Database lists the record as "Awaiting Analysis," so NIST has not scored it independently yet.

The maintainers found no evidence that any package or database record was changed. They also say they cannot rule out that the attacker read data stored in the database, because database reads are not logged. Separately, the attacker's commands could read the credentials the servers use, so the maintainers replaced them, including the keys that sign sessions and access tokens. That rotation is the reason every Hex.pm user has been logged out.

Ten years in the request parser

Hex.pm accepts some request bodies in a format called application/vnd.hex+erlang. These bodies are encoded in the Erlang term format, the BEAM virtual machine's native way of turning data structures into bytes. The format works well between trusted programs, but decoding it from strangers is a classic risk. The industry term is "deserialization of untrusted data," and that is how the NVD record describes the flaw.

According to the project's GitHub security advisory (GHSA-9pmm-hf4r-27pg), the problem was with struct values inside those request bodies. In Elixir, a struct is a map tagged with a special __struct__ key that tells the runtime what kind of data it holds. The decoder accepted those tagged values from any client, and the advisory says that was enough to reach remote code execution. ZeroDayFeed is not describing the exploitation chain any further.

Where the parser runs made the bug far worse. The advisory says it executes before routing and before authentication, so a POST request to any route on the site reached it. An attacker needed no account, no token and no particular API endpoint, only the ability to send an HTTP request.

The advisory lists hex.pm as affected from 2016-02-23 until 2026-11-23, which is the entire time the vulnerable code was in production. The fix is commit 379b0a2. It rejects any decoded map that contains a __struct__ key, so the parser can no longer receive those tagged values from the outside.

What the attacker could reach

The maintainers split their findings into what they could verify and what they could not.

What they checked and found clean: All 23 releases published to the registry during the incident match entries in the registry's audit log, and no older release was changed, according to the maintainers' report and The Hacker News. The maintainers say they found no sign that packages or the database were modified.

What they cannot rule out: Database reads are not logged, so the team cannot tell whether the attacker queried user records. The data at risk includes email addresses, password hashes, API key hashes, two-factor authentication secrets, session data and audit logs. A stolen 2FA secret is a serious problem, because anyone who has it could generate valid one-time codes until the user sets up a new authenticator entry.

The maintainers say passwords are hashed with bcrypt, an algorithm built to be slow and costly to crack. They say API keys are random 128-bit values stored as HMAC-SHA256 hashes and do not need to be rotated. Weak or reused passwords are still the main concern. Bcrypt slows down offline guessing, but it does not stop it.

The response

The maintainers' incident report lists these steps:

  • Patch: all servers were replaced with a patched build between 18:30 and 18:31 UTC on Nov. 23, shortly after the last malicious request.
  • Rotation: the storage, CDN, email and database credentials were replaced, along with the keys that sign sessions and access tokens. This logged everyone out of hex.pm and Hex clients.
  • Disclosure: the incident was reported to Sweden's data protection authority (IMY), the U.S. Cybersecurity and Infrastructure Security Agency (CISA) and the EU's cybersecurity agency (ENISA) on Nov. 23. The CVE and GitHub advisory were published Nov. 24.

One item is still open. The maintainers say the registry signing key has not yet been replaced, and they are building a new registry signing system that supports key rotation. Their advice is to install an updated Hex client when one is released and, until then, to fetch packages only from the official repository, repo.hex.pm, and not trust third-party mirrors.

The sources do not attribute the attack to any group or nation-state. The Hacker News reports that who was behind it is unknown.

What It Means for Defenders

Who is affected: anyone with a Hex.pm account, including package maintainers, organization members and developers who log in to publish or manage packages. Developers who never created an account and only fetch public packages have nothing to reset, according to a maintainer clarification reported by The Hacker News, but teams should still review where their build systems fetch packages from.

What to do now, per the maintainers and The Hacker News:

  • Change your Hex.pm password. If you reused it anywhere else, change it there too. Bcrypt makes cracking slower, not impossible.
  • Reset your two-factor authentication. Set up a new authenticator entry and store the new recovery codes, so that any 2FA secret that might have been copied stops working. Remove the old entry from your authenticator app.
  • Log in again and review your account. All sessions were invalidated. After you log back in, check recent activity on packages you own.
  • Update the Hex client when the new version is released. The maintainers expect a release with the new signing system within days, because the registry signing key has not yet been replaced.
  • Fetch packages only from repo.hex.pm and avoid mirrors for now. Check CI pipelines, Docker build images and internal proxies for any setting that points dependency fetching somewhere other than the official repository.
  • Watch for phishing. Because email addresses may have been exposed, check that links in any email claiming to come from Hex lead to hex.pm.
  • API keys: the maintainers say rotation is not required because only HMAC-SHA256 hashes of random 128-bit values were stored. Teams with strict incident policies can still rotate CI publishing keys if they want to.

Server side: the registry itself was fixed by commit 379b0a2, and there is nothing for end users to patch on hex.pm. The Hacker News notes the flaw sits in the hexpm server code, not the Hex client, so organizations that run their own copy of the registry are affected until they deploy the patch. They should check whether they decode the application/vnd.hex+erlang format and apply the same fix, which rejects decoded maps that carry a __struct__ key.

For compliance teams: contractors working under CMMC or similar frameworks who use Elixir or Erlang may want to log this as a supply-chain event in their software inventory. Record that a dependency source was compromised, what the maintainers checked (the 23 releases matched the audit log and no older release changed), and what was rotated.

The general lesson: this request parser decoded a rich native data format before any authentication check, and the vulnerable code stayed in production for ten years. Any service that deserializes language-native formats from the open internet should restrict decoding to plain data types and should place authentication in front of any parser that does more than that.

Sources