Hex.pm breached through a CVSS 10 flaw; Elixir and Erlang users told to reset passwords and 2FA
Attackers ran commands on hex.pm servers on 23 Nov 2026 via CVE-2026-129514. Hex rotated keys and asks users to change passwords, reset 2FA and avoid mirrors.

TL;DR
- An attacker exploited CVE-2026-129514 on 23 November 2026 to run commands on six hex.pm web servers; Hex blocked the traffic and deployed a fix within 20 minutes [1].
- Hex found no changed packages or database writes, but cannot rule out reads of emails, password hashes, 2FA secrets and sessions [1].
- Users should change their hex.pm password, reset 2FA, fetch packages only from repo.hex.pm and update the Hex client when the new signing release ships [1].
Hex, the package registry for Elixir and Erlang, says an unauthorised party exploited a flaw in hex.pm on 23 November 2026 and ran commands on its web servers [1]. The team blocked the traffic and deployed a fix within 20 minutes [1]. The flaw is tracked as CVE-2026-129514 [1]. Thailand’s national CERT, ThaiCERT, issued an alert about it on 27 November and lists the CVSS v4.0 score as 10.0 [3].
Why it matters
Hex.pm is the repository where Elixir and Erlang packages are stored and published [3]. Hex found no evidence of modified packages, database changes or lasting access [1]. Because database reads are not logged, it cannot rule out that the attacker read email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs [1]. ThaiCERT’s alert also tells organisations that run their own registry from the hexpm/hexpm source code to update it [3].
What went wrong
hex.pm decoded unauthenticated request bodies in the Erlang term format before routing and authentication ran [2]. The decoder blocked functions and new atoms but let maps with a __struct__ key through, so an attacker could send fake Elixir structs [2]. When error reporting inspected those structs, a chain through Ecto.Query.DynamicExpr and DBConnection.Stream reached a function call built from the request, which ran operating system commands as the BEAM user [2]. That user could read the app’s environment, including the database URL, storage credentials and the registry signing key [2].
The attacker sent 69 malicious requests between 18:16 and 18:29 UTC, and six web servers were affected [1]. The safety check in the decoder had been removed on 23 February 2016 [1]. The fix, commit 379b0a2, makes the decoder reject any term containing a map with a __struct__ key and return HTTP 400 [1]. While investigating, Hex found the same class of bug in Ash, fixed in ash 3.38.0 as CVE-2026-124283 [1].
What users should do
- Change your password at hex.pm [1].
- Reset 2FA under “Authenticator App” with “Setup New App” and store the new recovery codes [1].
- Fetch packages only from repo.hex.pm, not third-party mirrors, until the new registry signing system ships [1].
- Update the Hex client with
mix local.hex --forcewhen that release is out, and update rebar3 or Gleam if you use them [1]. - Self-hosted hexpm/hexpm servers need commit
379b0a2or later, rebuilt and redeployed on every machine [2][3].
Limits
Hex rotated its storage, CDN, email and database credentials and the keys that sign sessions and tokens, which logged everyone out [1]. By 24 November it had rotated every credential the attacker could have read except the registry signing key and a few low-impact secrets, and it is building a new registry signing system that supports key rotation [1]. Hex says API keys do not need rotating, because they are 128-bit random values stored as HMAC-SHA256 [1].
Sources
Written and checked by AI from the sources below
- Security incident on hex.pm
- Unauthenticated remote code execution through struct values in Erlang term request bodies (GHSA-9pmm-hf4r-27pg)
- แจ้งเตือน พบช่องโหว่ใน Hex.pm เสี่ยงถูกสั่งประมวลผลคำสั่งและเข้าถึงข้อมูลบัญชีผู้ใช้งาน
Fact-checked by gpt-6.1-sol on · Editorial policy



