Protect.Computer
NEWS

Hex.pm Hit via CVE-2026-129514: Reset Your Password and 2FA

· 3 min read · Got hacked Malicious byte
Hex.pm Hit via CVE-2026-129514: Reset Your Password and 2FA

On Monday, November 23, an attacker ran operating system commands on six production servers of Hex.pm, the package registry that Elixir and Erlang developers pull their dependencies from. The Hex team says it blocked the traffic and had every server on a patched build within about 15 minutes of the first malicious request. Its checks found no sign that any package was changed. It could not rule out that the attacker read account data, so it replaced the credentials the servers used, logged every user out and is asking account holders to reset their password and two-factor authentication (2FA).

The flaw is tracked as CVE-2026-129514 and carries the maximum CVSS score of 10.0. According to the Hex team’s incident report and the GitHub advisory, hex.pm decoded unauthenticated request bodies in the Erlang data format before routing and login checks, and the decoder let fake Elixir “struct” values through. The team says a safety check against this was removed from the code on February 23, 2016. Chained through the error-reporting code and two database libraries, the crafted data ended with the server running commands as the registry’s service account. The Hex team says the load balancer logged 69 exploit requests from two addresses between 18:16 and 18:29 UTC. The Hacker News says who was behind the attack is unknown and that exploitation before that Monday has not been established.

The Hex team’s audit of the 23 releases published during the attack found they match its audit log, and it found no older release changed and no new accounts or cloud keys. Reads of the database, shell commands and environment variables were not logged, so the team wrote that it cannot rule out that the attacker accessed email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs, or that private packages were read. The registry signing key has not been replaced yet; a new signing system and Hex client releases are promised within days. The team reported the breach to the Swedish data protection authority (IMY), CISA and ENISA on the night of the attack.

Three Elixir libraries disclosed related flaws on the same day, involving structs built from untrusted data. The Hacker News describes these as separate disclosures, not further attacks on Hex.pm; the Hex forum post calls it the same class of vulnerability.

How to check if you’re affected

Affected products are Hex.pm accounts and the Hex clients (mix, rebar3, Gleam) that sign in to them. Per the Hex team’s blog post and forum announcement:

  • If you have a hex.pm account, change your password and reset 2FA at hex.pm/dashboard/security: under “Authenticator App”, choose “Setup New App” and verify a code from the new entry, then store the new recovery codes. The blog says this works even when an organization requires 2FA.
  • Log back in to your client (the forum post gives mix hex.user auth or rebar3 hex user auth), since all sessions and tokens were invalidated.
  • If you signed up with GitHub, the forum post says to still log back in, and to reset 2FA if you set it up.
  • Update the Hex client when the release with the new signing system ships (mix local.hex --force; update rebar3 or Gleam if you use them). Until then the team says to fetch packages only from repo.hex.pm and to avoid third-party mirrors.
  • The team says API keys do not need rotating: it describes them as random 128-bit values stored as HMAC-SHA256 hashes.
  • Be careful with emails that claim to come from Hex, and check that links go to hex.pm; the team asks that suspicious emails be forwarded to security@hex.pm.
  • The Hacker News quotes a maintainer saying that developers who never created a hex.pm account and only fetch public packages have nothing to reset. We did not find that line on the pages we read, so treat it as THN’s attribution.

If you use the affected libraries, the Hex forum post says to upgrade Ash to 3.38.0 or later (CVE-2026-124283) and db_connection to 2.10.3 or later (CVE-2026-133555). For flop (CVE-2026-130411) the forum post says to use the latest version; The Hacker News lists the fixed releases as 0.26.7, 0.27.3, 0.28.1 and 0.29.2 depending on branch. The db_connection advisory says its flaw is not exploitable in db_connection alone.

Sources

Related reading