Home/Research/Post

Hex.pm RCE (CVE-2026-129514) Exploited in Server Attack

An attacker exploited a critical remote code execution flaw in Hex.pm, the package registry for Elixir and Erlang, to run commands on its web servers on November 23, 2026. The maintainers report no evidence that packages were modified, but cannot rule out that some user data was read.

What Is CVE-2026-129514?

CVE-2026-129514 is an unauthenticated Remote Code Execution (RCE) vulnerability in the Hex.pm service, the registry behind the Hex package manager. According to the GitHub security advisory, it carries a CVSS 4.0 score of 10.0 (Critical) and maps to CWE-502, Deserialization of Untrusted Data. The EEF CNA record credits Eric Meadows-Jönsson, Jonatan Männchen, Peter Ullrich and Wojtek Mach, and states that the flaw was actively exploited against hex.pm on November 23, 2026.

SOCRadar Vulnerability Intelligence card for CVE-2026-129514
SOCRadar Vulnerability Intelligence card for CVE-2026-129514

The flaw sat in the hex.pm web application. The Hex client that developers run locally was not affected. Developers who only fetch dependencies with mix deps.get and have no Hex account were not directly exposed by the vulnerable code path, although they should still follow the client update guidance below.

How Does the Flaw Work?

Hex.pm accepts some API requests in an Erlang term format. The body parser decoded these payloads with a function from the Plug.Crypto library in its “safe” mode, which was expected to refuse dangerous content. The advisory explains that the decoder still accepted maps carrying a special struct marker, which let an attacker hand the application objects of their choosing.

Because the parser runs before routing and authentication, any POST request could reach it without logging in. The advisory describes a chain through library code in Plug, Ecto and DBConnection that ends with the application calling a function chosen by the attacker, which gives operating system command execution as the user running the Erlang VM. The fix makes the decoder reject any term containing such a struct and return an HTTP 400 error.

Affected Versions and Fix

Hex.pm is a hosted service, so affected ranges are given as deployment dates and commits. The CVE record published by the EEF CNA and the advisory list the following ranges.

Component Affected Fixed
hex.pm service From 2016-02-23 to before 2026-11-23 Deployed 2026-11-23
hexpm/hexpm repository From commit ab1bbce to before 379b0a2 Commit 379b0a2

The fix commit was deployed during the incident response. Anyone running a self-hosted or forked deployment of the hexpm/hexpm web application should confirm that commit 379b0a2, or an equivalent fix, is deployed. Third-party package mirrors are a separate concern: Hex.pm advises against trusting them until its new registry signing system and updated clients ship.

How Did the Attack Unfold?

The Hex.pm team published a detailed incident write-up with a timeline in UTC. The first exploit request arrived at 18:16 on November 23, and the team reports 69 malicious requests between 18:16 and 18:29. Six web servers were affected, partly because a restart at 18:28 brought up three new servers still running the vulnerable build.

Time (UTC) Event
Nov 23, 18:16 First exploit request recorded
Nov 23, 18:27 Firewall rule added to block attacker traffic
Nov 23, 18:29 Last exploit request to reach a server
Nov 23, 18:30-18:31 All servers replaced with the patched build
Nov 23, 20:21 Most infrastructure credentials rotated
Nov 24, 13:48 CVE-2026-129514 published

The team says the attacker had been downloading Hex.pm’s own dependencies since November 19, which suggests they built a local copy of the application to test against. The same evening, the maintainers reported a personal data breach to IMY, the Swedish data protection authority, reported the incident to CISA and sent an early warning to ENISA. The post says a separate security report describing the same flaw reached the team at 19:07, after the fix was already live.

What Was Exposed, and What Was Not?

Hex.pm reports no evidence of unauthorized package modifications, database changes or lasting attacker access. It says all 23 releases published during the incident match audit log entries, that all 62 package files written since 18:00 match stored checksums, and that all 186 registry files written since then match database contents. Documentation archives have no stored checksum, so they could not be compared the same way. The database comparison would not show a row that was changed and then reverted, or one later overwritten by a legitimate change.

Database reads are not logged, so the team states it cannot rule out access to email addresses, password hashes, API key hashes, two-factor authentication (2FA) secrets, sessions and audit logs. The advisory adds that the application environment holds the database URL, storage credentials and the registry signing key, all readable by the compromised process. Neither source says the signing key was taken, but per the blog timeline it had not been rotated as of the morning of November 24.

Passwords are stored as bcrypt hashes, and Hex says its API keys are random 128-bit values stored as HMAC-SHA256 hashes, so it does not see a need to rotate API keys. Private package and documentation access also could not be fully ruled out, since direct cloud storage reads are not logged.

Why Does a Registry Compromise Matter?

A package registry sits at the root of trust for every project that installs from it. An attacker with code execution on registry servers could, in principle, try to publish altered packages, tamper with metadata or harvest credentials that unlock further access. That is why the maintainers checked release audit logs and file checksums first, and why the open question about the registry signing key matters more than the incident’s short duration.

The Hex.pm team says it is building a new registry signing system that supports key rotation, with new client releases planned in the coming days. Until the key is rotated, a copy of it in the wrong hands could let someone sign a malicious registry for a mirror or a network position they control, which is the reason for the advice to use only the official repository. No source reports that this has happened.

Related Flaws in the Elixir Ecosystem

The Elixir Forum announcement lists several library vulnerabilities disclosed alongside the incident. Ash has a related issue in keyset pagination, tracked as CVE-2026-124283 and fixed in Ash 3.38.0, which the post describes as the same class of vulnerability. It also lists CVE-2026-133555 in db_connection, fixed in 2.10.3, and CVE-2026-130411 in flop, where users should move to the latest release.

In the forum thread, Peter Ullrich of the Hex team noted that Phoenix uses the same Plug.Crypto function to decode signed cookies and said this might change soon. The Hex team also plans hardening in plug_crypto, plug, ecto and db_connection so that similar decoding paths are harder to abuse. Teams that decode Erlang terms from untrusted input in their own Elixir applications should review that code, and the forum thread suggests checking other plug_crypto dependents for the same call.

Steps for Hex.pm Users and Maintainers

Hex.pm has asked users to take the first seven steps below; the last three are additional SOCRadar recommendations. Users who signed up with GitHub should still log in again and reset 2FA if they enabled it.

  • Change your Hex.pm password, because password hashes may have been read
  • Reset 2FA from the Hex.pm security dashboard by setting up a new authenticator app, which issues a new secret and new recovery codes
  • Log in to the Hex client again with mix hex.user auth or rebar3 hex user auth, since the credential rotation signed everyone out
  • Update the Hex client when the release with the new registry signing system ships, using mix local.hex –force, and update rebar3 or Gleam if you use them
  • Until then, fetch packages only from repo.hex.pm and avoid third-party mirrors
  • Treat emails claiming to come from Hex with caution, check that links point to hex.pm, and forward suspicious messages to security@hex.pm
  • Upgrade Ash, db_connection and flop to the fixed versions listed above if you use them
  • Maintainers should review recent releases, ownership changes and API key activity on their packages for anything they did not do
  • Check CI logs from November 23 and 24 for failed Hex authentication, since the credential rotation signed everyone out, and expect to log in again
  • Review lockfile changes in recent pull requests for unexpected checksum or version changes in mix.lock

Tracking Hex.pm Incident With SOCRadar

A compromised package registry is a supply chain problem for every project that installs from it. SOCRadar helps teams follow CVE-2026-129514 and the related Elixir library flaws:

  • Autonomous Exposure Management: Helps teams find internet-facing Elixir applications and private Hex mirrors they may not be tracking.
  • Vulnerability Intelligence: Tracks CVE-2026-129514, CVE-2026-124283 and the other Elixir library flaws for exploitation reports and fixes, so teams can prioritize patching.
  • Dark Web Monitoring: Watches for underground posts offering exploit code or any leaked Hex.pm account data tied to the incident.
SOCRadar’s Exposure Management
SOCRadar’s Exposure Management

What the attacker could read, including the registry signing key, depends on Hex.pm’s continuing investigation.

Cyber Threat Intelligence

Source: SOCRadar · 2026-11-25