News
Hex.pm attacker ran commands on six registry servers, then everyone was logged out.
On Monday an attacker ran operating-system commands on six Hex.pm production servers through a maximum-severity parser bug from 2016. Packages were not changed. Account data may have been read, and every account was logged out.

Impact
- What was impacted
- Hex.pm, the package registry Elixir and Erlang developers fetch dependencies from. CVE-2026-129514, scored 10.0, is in the server parser that reads request bodies in an Erlang data format. That parser ran before routing and before login, so an unauthenticated POST to any address on the site could reach it. The decoder accepted maps with a __struct__ key, which let a body pose as an Elixir struct the application had loaded. The struct caused an error, and error reporting through Ecto and DBConnection reached a function the attacker chose, which then ran operating-system commands as the registry service account. The safety check that would have stopped this was removed on February 23, 2016. On Monday, November 23, 2026, the attacker ran commands on six production web servers. Load-balancer logs recorded 69 exploit requests from 18:16 to 18:29 UTC, from two addresses this report does not publish. Every server was on the patched build by 18:31 UTC. Three of the six servers came up during the attack, still on the vulnerable build, after a restart. Package and registry files were not changed. Database reads, shell commands, environment variables, and direct file-storage reads were not logged, so the team cannot rule out access to email addresses, password hashes, API key hashes, two-factor secrets, session data, or private packages.
- Who was impacted
- Anyone with a hex.pm account, including people who signed up with GitHub. People who never created an account and only fetch public packages have nothing to reset. Organizations that run their own copy of the hexpm registry server are affected until they deploy the patch. This flaw is in the server, not in the Hex client. Maintainers of apps that use Ash, db_connection, or Flop have separate fixes that are not further attacks on Hex.pm.
- What you need to do
- Change your hex.pm password, reset two-factor authentication with a new authenticator entry, store the new recovery codes, and sign the client back in with mix hex.user auth or, for Erlang, rebar3 hex user auth. Update the Hex client when the next release ships, expected within days. Until then, fetch packages only from repo.hex.pm and avoid third-party mirrors, because the registry signing key is not replaced yet and the attacker could have read it. API keys do not need to be replaced. Check that links in any Hex email go to hex.pm. For a private hexpm server, deploy the patch. This report does not name that server's version number. Separately, update Ash to 3.38.0, db_connection to 2.10.3, and Flop to 0.26.7, 0.27.3, 0.28.1, or 0.29.2 for the branch you are on.
On Monday, November 23, 2026, an attacker ran operating-system commands on six production servers of Hex.pm, the package registry Elixir and Erlang developers use. The bug, CVE-2026-129514, is scored 10.0. It has been in the registry since a safety check was removed on February 23, 2016, and the advisory lists hex.pm as affected from that date until Monday. The maintainers had every server on a patched build by 18:31 UTC, about 15 minutes after the first malicious request. Later checks found no sign that any package was changed. The team could not rule out that the attacker read account data.
The parser for request bodies in an Erlang data format ran before routing and before authentication, so a POST from someone with no account, to any address on the site, could reach it. The decoder was meant to be safe and did block dangerous terms such as functions, but it accepted maps with a __struct__ key. A request body could therefore pose as any Elixir struct the application had loaded. That struct ran nothing by itself. It caused an error, and the error-reporting code inspected it. Through the Ecto and DBConnection libraries, that inspection reached a point where the server called a function the attacker chose, and that call ran commands with the registry service account's permissions. The fix makes the decoder reject any term that contains a map with a __struct__ key. Exploitation before Monday has not been established. Load-balancer logs show 69 exploit requests between 18:16 and 18:29 UTC, all from two addresses. Files created by the exploit appeared on six web servers, in one case 3 milliseconds after the request. Three of those servers joined during the attack, when a restart brought up machines that were still on the vulnerable build.
To check packages, the team compared every database table with a copy taken two minutes before the first exploit request and traced each difference to normal activity. The 23 releases published during the attack match the audit log, no older release was changed, and the package and registry files written that evening match the database records. Database reads, shell commands, environment variables, and direct reads from file storage were not logged. For that reason the team wrote that it cannot rule out access to data in the database. That database holds email addresses, password hashes, API key hashes, two-factor authentication secrets, and session data, and private packages could also have been read without leaving a trace. The checks found no leftover shells and no new accounts or cloud keys in the audit logs. Who did it is unknown. Activity from the two addresses going back to late last week suggests, according to the team, that the attacker built a local copy of hex.pm to test against. A separate report of the same flaw arrived by email at 19:07 UTC on Monday, after the attack had ended. By the morning of November 24 the team had replaced every credential the attacker could have read except the registry signing key. On Monday night it reported the breach to the Swedish data protection authority, to CISA in the United States, and to ENISA in the European Union.
Everyone with a hex.pm account has been logged out, because the maintainers replaced the keys that sign sessions and access tokens. Change the hex.pm password. Reset two-factor authentication by setting up a new authenticator entry, and store the new recovery codes. Sign back in with mix hex.user auth or, for Erlang projects, rebar3 hex user auth. Update the Hex client when the next release ships, expected within days, because it brings a new registry signing system. Until that client ships, fetch packages only from repo.hex.pm and avoid third-party mirrors. The registry signing key has not been replaced, and it was among the credentials the attacker could have read. API keys do not need to be replaced. The team says they are random 128-bit values stored only as HMAC-SHA256 hashes, which cannot realistically be brute-forced. Passwords are hashed with bcrypt, which slows guessing and does not stop it for a weak password, so changing them still matters. Peter Ullrich, one of the report's authors, said on the Elixir Forum that developers who never created a hex.pm account and only fetch public packages have nothing to reset. People who signed up with GitHub should still sign their clients back in, and should reset two-factor authentication if they enabled it. Exposed email addresses may be misused, so check that any link in an email about Hex goes to hex.pm.
On November 24, maintainers of three Elixir libraries shipped separate fixes for structs built from untrusted data. These are not further attacks on Hex.pm. Ash CVE-2026-124283 affects 3.31.3 up to, but not including, 3.38.0, and the fixed version is 3.38.0. The Ash advisory says it requires keyset pagination with a client-supplied cursor, certain sort field types, and a signing secret left at its unset default. db_connection CVE-2026-133555 affects 1.1.0 up to, but not including, 2.10.3, and the fixed version is 2.10.3. The DBConnection advisory says it is not exploitable in db_connection alone, because another component must first decode untrusted data into structs. Flop CVE-2026-130411 affects releases from 0.8.0, each branch before its fixed version, and the fixed versions named are 0.26.7, 0.27.3, 0.28.1, and 0.29.2. The Flop advisory's conditions are similar and concern its pagination cursors. The exploited flaw sits in the hexpm server code, not in the Hex client, so an organization that runs its own copy of the registry is affected until it deploys the patch. This report does not name a version number for that private copy.
For your AI agent
Agent instructions — copy paste to Claude
You are helping me respond to the Hex.pm incident on Monday, November 23, 2026, tracked as CVE-2026-129514, scored 10.0. An attacker ran operating-system commands on six production registry servers. Do not write or send a crafted request body, do not pose as an Elixir struct, and do not run commands against hex.pm or a private registry to test the parser. Ask before changing a password, resetting two-factor authentication, replacing a key, updating a dependency, or deploying a patch. Facts from the report: - Hex.pm is the package registry Elixir and Erlang developers fetch dependencies from. On Monday, November 23, 2026, an attacker ran operating-system commands on six production servers. The flaw had been in the registry code since February 23, 2016, when a safety check was removed. The advisory lists hex.pm as affected from February 23, 2016 until Monday. Every server was on a patched build by 18:31 UTC, about 15 minutes after the first malicious request. Exploitation before Monday has not been established. - Checks found no sign that any package was changed. Whether the attacker read account data could not be ruled out. - CVE-2026-129514 is scored 10.0. The parser that reads request bodies in an Erlang data format ran before routing and authentication, so an unauthenticated POST to any address on the site could reach it. The decoder blocked dangerous terms such as functions, but it accepted maps with a __struct__ key, which allowed a request body to pose as any Elixir struct the application had loaded. Do not construct such a map. - A crafted struct ran nothing by itself. It caused an error. Error reporting then inspected the struct. Through Ecto and DBConnection, that inspection reached a point where the server called a function of the attacker's choice, which then ran operating-system commands with the permissions of the registry service account. - The fix commit makes the decoder reject any term containing a map with a __struct__ key. Do not reimplement that decoder from this prompt. Deploy the maintainers' patch. - Load-balancer logs recorded 69 exploit requests between 18:16 and 18:29 UTC on Monday, all from two addresses. This report does not publish the addresses. Do not invent them, and do not block a network from this prompt. - Files created by the exploit appeared on six web servers, in one case 3 milliseconds after the request. Three of those servers joined mid-attack, when a restart brought up machines still on the vulnerable build. - The team compared every database table against a copy taken two minutes before the first exploit request and traced each difference to normal activity. The 23 releases published during the attack all match the audit log. No older release was changed. The package and registry files written that evening match the database records. - Database reads, shell commands, environment variables, and direct reads from file storage were not logged. The team wrote that it cannot rule out that the attacker accessed data stored in the database. That database holds email addresses, password hashes, API key hashes, two-factor authentication secrets, and session data. Private packages could also have been read without leaving a trace. Do not print hashes, secrets, recovery codes, or session tokens. - The checks found no leftover shells and no new accounts or cloud keys in the audit logs. Who was behind the attack is unknown. Activity from the two addresses going back to late last week suggests the attacker built a local copy of hex.pm to test against, according to the team. Treat that as the team's suggestion. - A separate security report describing the same flaw arrived by email at 19:07 UTC on Monday, after the attack had ended. By the morning of November 24, 2026, the team had replaced every credential the attacker could have read except the registry signing key. On Monday night it reported the breach to the Swedish data protection authority, to CISA in the United States, and to ENISA in the European Union. Do not file a report to those bodies from this prompt. - Everyone with a hex.pm account has been logged out because the maintainers replaced the keys that sign sessions and access tokens. The advised steps are: change the hex.pm password; reset two-factor authentication by setting up a new authenticator entry and store the new recovery codes; log back in with mix hex.user auth or, for Erlang projects, rebar3 hex user auth; update the Hex client when the next release ships, expected within days, with a new registry signing system; watch for phishing, and check that links in any email about Hex go to hex.pm. - API keys do not need to be replaced, according to the team. They are random 128-bit values stored only as HMAC-SHA256 hashes, which it says cannot realistically be brute-forced. Passwords are hashed with bcrypt, which slows guessing but does not stop it for weak passwords, so changing them still matters. Do not rotate API keys unless I ask, and do not say this report requires it. - Peter Ullrich, one of the report's authors, said on the Elixir Forum that developers who never created a hex.pm account and only fetch public packages have nothing to reset. Those who signed up with GitHub should still log back in to their clients, and reset two-factor authentication if they enabled it. - Until the new client ships, fetch packages only from repo.hex.pm and avoid third-party mirrors. The registry signing key has not yet been replaced, and it was among the credentials the attacker could have read. - Separate library fixes shipped on November 24, 2026. They are not further attacks on Hex.pm. Ash CVE-2026-124283: affected 3.31.3 up to, but not including, 3.38.0; fixed in 3.38.0. The Ash flaw requires keyset pagination with a client-supplied cursor, certain sort field types, and a signing secret left at its unset default. db_connection CVE-2026-133555: affected 1.1.0 up to, but not including, 2.10.3; fixed in 2.10.3. The advisory says it is not exploitable in db_connection alone, because another component must first decode untrusted data into structs. Flop CVE-2026-130411: from 0.8.0, each branch before its fixed version; fixed versions named are 0.26.7, 0.27.3, 0.28.1, and 0.29.2. The Flop conditions are similar and concern pagination cursors. - The exploited flaw sits in the hexpm server code, not in the Hex client. Organizations that run their own copy of the registry are affected until they deploy the patch. This report does not name a version number for that private copy. Do not invent one. Context: - What was impacted: six Hex.pm production servers, and possibly account records and private packages. Public package files checked out as unchanged. The registry signing key may have been readable and has not been replaced. - Who should care: hex.pm account holders, GitHub-signup users of Hex, operators of a private hexpm registry, and apps on the affected Ash, db_connection, or Flop versions. - What to do: change the account password, reset two-factor authentication, sign the client back in, stay on repo.hex.pm until the new client ships, and deploy the server patch on any private registry. Update the three libraries only where the versions above match. Do this in order. Ask before changing a password, resetting two-factor authentication, revoking a session, editing mix or rebar config, updating a dependency, or deploying a registry patch. Prefer read-only inventory first. Do not write or run an exploit or a proof of concept. Do not send a request body to hex.pm to test the parser. 1. Inventory - Record whether we have a hex.pm account, whether we signed up with GitHub, and whether two-factor authentication is enabled. Do not change the password or the second factor in this step. - Record how the Hex client authenticates, including mix hex.user auth or rebar3 hex user auth, and which registry host we fetch from. If it is not repo.hex.pm, say so. Do not switch the host in this step. - Record whether we run our own copy of the hexpm registry server and, if we can read it, whether that copy rejects a map with a __struct__ key. Do not send a test payload. If we cannot tell, say this report names no version number for a private copy. - Record installed versions of ash, db_connection, and flop if those libraries are in the project. Map them only to the ranges above. Do not mark any other Elixir library from this report. - Search mail we already have for messages about Hex. Record the sender and whether each link's host is hex.pm. Do not open a link that is not hex.pm. 2. Contain - If a Hex email link does not go to hex.pm, propose ignoring that message. Do not click it. - If a client is configured to a third-party mirror, propose fetching only from repo.hex.pm until the new Hex client ships. Ask before you change the config. - Do not replace API keys in this step. This report says they do not need to be replaced. - Do not disable the registry, and do not delete packages. 3. Remediate - After I agree, change the hex.pm password and reset two-factor authentication with a new authenticator entry. Tell me to store the new recovery codes somewhere I control. Do not print the codes or the password. - After I agree, sign the client back in with mix hex.user auth or rebar3 hex user auth, matching the tool we already use. - After I agree, point package fetches at repo.hex.pm only. Do not add a mirror. - After I agree, update Ash only to 3.38.0 if we are on 3.31.3 up to, but not including, 3.38.0. Update db_connection only to 2.10.3 if we are on 1.1.0 up to, but not including, 2.10.3. Update Flop only to the fixed version this report names for our branch among 0.26.7, 0.27.3, 0.28.1, and 0.29.2, and only if we are on 0.8.0 or newer and below that fixed version. Stop if you cannot tell which branch we are on. - For a private hexpm server, stop until we have the maintainers' patch in front of us. Do not invent a version, and do not edit the decoder by hand from this prompt. - Do not install a Hex client version this report does not name. It says the next release is expected within days and does not give the version. 4. Verify - If I asked you to change something, confirm the registry host is repo.hex.pm, the library versions now installed, and that you did not print secrets. Do not print a password, a recovery code, or a token. - If I did not ask you to change anything, report the inventory only. 5. Report back - Whether we have an account, whether two-factor authentication was enabled, the registry host, any private registry and that this report names no build for it, the Ash, db_connection, and Flop versions against the ranges above, and that packages on the public registry were checked and not found changed. State that account data and private packages could still have been read, that API keys were not called out for replacement, and that the registry signing key was not replaced. Do not invent addresses, client version numbers, or a private-registry build. If a check needs access I have not given you, say what you need and stop.