Hex.pm RCE Compromise: What Elixir Teams Should Rotate and Verify

Hex.pm RCE Compromise: What Elixir Teams Should Rotate and Verify
The Hex package registry disclosed a security incident after an attacker exploited an unauthenticated remote-code-execution flaw to run commands on six production web servers.
The vulnerability is tracked as CVE-2026-129514 and carries a CVSS 4.0 score of 10.0. Hex says it blocked the attack and deployed a fix within roughly 20 minutes, found no evidence that packages were modified or database rows changed, and cannot rule out reads of account data because database reads were not logged. Every Elixir or Erlang team that uses Hex should treat this as a credential, registry-trust, and dependency-integrity event.
What happened
On November 23, 2026, an attacker sent 69 malicious requests to hex.pm between 18:16 and 18:29 UTC. Hex says commands ran on six web servers before the traffic was blocked and the fleet was replaced with a patched build. The service rotated storage, CDN, email, database, session-signing, and access-token credentials, which logged users out.
Hex reports no evidence of unauthorized package modifications, database changes, or persistent access. That is reassuring but not equivalent to proof that no information was read. The incident report says database reads were not logged, and the attacker could potentially have reached email addresses, password hashes, API-key hashes, 2FA secrets, sessions, audit logs, and credentials used by the servers.
The vulnerability behind the compromise
The vulnerable Hex.pm server code decoded unauthenticated request bodies in Erlang term format before routing and authentication. Its use of Plug.Crypto.non_executable_binary_to_term/2 blocked many dangerous terms but allowed crafted struct values. Chained together, those values enabled remote code execution on the registry's web servers.
This was a server-side flaw in the registry, not a malicious release in the Hex client. Organizations running their own copy of the Hex registry should deploy the server-side fix as well. The event still matters to every downstream development team because a compromised package registry sits inside the software supply chain: it is a trusted place from which build systems resolve code and metadata.
What Hex users should do now
- Change the Hex account password. Assume account data may have been readable even though Hex found no evidence of database writes.
- Reset 2FA. Generate a new authenticator secret and new recovery codes in the Hex security dashboard.
- Rotate automation credentials. Replace API keys, deploy tokens, CI secrets, and any cloud credentials that could have been reachable from Hex-connected workflows.
- Use only the official registry path. Until Hex's new signing system and client releases are available, use
repo.hex.pmand treat third-party mirrors as untrusted. - Update the Hex client. Install the release that includes the new registry-signing system when Hex publishes it; also update rebar3 or Gleam where applicable.
- Review build logs and dependency resolution. Preserve CI/CD logs, compare lockfiles, and investigate unexpected package versions, registry endpoints, or authentication events since November 23.
- Rebuild sensitive artifacts. For high-value applications, resolve dependencies from a clean environment, verify checksums and lockfiles, and compare outputs against known-good builds.
The related ecosystem warning
Hex also points to separate vulnerabilities in commonly used Elixir packages, including Ash, db_connection, and Flop. Those disclosures are not evidence that the Hex attacker modified packages, but they reinforce the need for disciplined dependency review. Pin versions, monitor advisories, and make vulnerability management part of the normal release process rather than waiting for a registry incident.
What defenders should look for
Security teams should treat this as an incident response exercise across identity, CI/CD, and developer endpoints. Search for password and 2FA resets, new API keys, unusual package-resolution activity, changes to HEX_API_URL, access to private packages, and builds that resolved dependencies from mirrors or unexpected hosts. Review cloud audit logs for credential use from CI runners and package-publishing systems.
Do not claim that a package was poisoned without evidence. The confirmed facts are that commands ran on six Hex web servers, credentials were rotated, and Hex could not fully rule out data reads. That uncertainty is precisely why teams should rotate secrets and verify build provenance now.
Bottom line
The Hex.pm incident is a reminder that dependency trust is an operational security boundary. Change passwords, reset 2FA, rotate automation and cloud credentials, update the Hex client when the signed-registry release arrives, and verify your recent builds from clean, trusted inputs.
- CVE-2026-129514 record
- The Hacker News: Hackers exploited CVSS 10.0 Hex.pm RCE flaw
- Elixir Forum maintainer clarification
References
FAQ
The Hex package registry disclosed a security incident after an attacker exploited an unauthenticated remote-code-execution flaw to run commands on six production web servers.