Hex.pm RCE Attack Hit Six Servers, Users Must Reset Access
A Hex.pm RCE flaw was exploited on Monday, allowing an attacker to run operating system commands on six production servers used by Elixir and Erlang developers to download software dependencies. The vulnerability, tracked as CVE-2026-129514, carries a CVSS score of 10.0, the highest rating in the Common Vulnerability Scoring System, which measures the severity of security flaws.
The flaw had been present in Hex.pm's registry code since February 23, 2016. It affected the service until Monday, when maintainers applied a fix to every server within about 15 minutes of the first malicious request. Load balancer logs recorded 69 exploit requests between 18:16 and 18:29 UTC, all originating from two addresses. Files created through the exploit appeared on six web servers, including one case just three milliseconds after the request. Three servers joined the incident after a restart brought vulnerable machines back online.
The vulnerability was in a parser, software that reads and interprets incoming data. Hex.pm used it to process request bodies written in an Erlang data format before routing and authentication, the process that checks whether a user is allowed to access something. This meant an unauthenticated POST request, a web request that sends data without first logging in, could reach the vulnerable code at any address on the site.
The decoder was intended to be safe and blocked dangerous terms such as functions. However, it accepted maps containing a special __struct__ key, allowing an incoming request to pretend to be any Elixir structure loaded by the application. The crafted structure did not execute commands immediately. Instead, it triggered an error, after which error reporting inspected the structure. Through the Ecto and DBConnection database libraries, that inspection reached code that called a function chosen by the attacker, running operating system commands with the permissions of the registry service account.
The Hex.pm team said exploitation before Monday has not been established. Its checks found no evidence that packages were modified. The 23 releases published during the attack matched the audit log, no older release had changed, and package and registry files written that evening matched database records. The team compared every database table with a copy taken two minutes before the first exploit request and traced each difference to normal activity.
Some activity could not be verified because database reads, shell commands, environment variables and direct file reads were not logged. Hex.pm therefore could not rule out access to account information, including email addresses, password hashes, API key hashes, two-factor authentication secrets and session data. Private packages may also have been read without leaving a trace. Investigators found no leftover shells, new accounts or cloud keys in the audit logs. The attacker remains unidentified, although activity from the two addresses dating back to late last week suggested the creation of a local Hex.pm copy for testing.
The maintainers logged out every hex.pm account after replacing the keys used to sign sessions and access tokens. Account holders should change their hex.pm password, set up two-factor authentication again and save the new recovery codes. They must then sign in to the client with `mix hex.user auth`, or use `rebar3 hex user auth` for Erlang projects. A client update with a new registry signing system was expected within days. Until it is available, users were advised to download packages only from repo.hex.pm and avoid third-party mirrors.
API keys do not need to be replaced, according to the team. They are random 128-bit values stored only as HMAC-SHA256 hashes, a one-way mathematical form that the maintainers said cannot realistically be brute-forced. Passwords use bcrypt, a deliberately slow password-hashing method that makes guessing harder but does not protect a weak password, so changing passwords remains important. People who never created a hex.pm account and only download public packages have nothing to reset. Users who registered with GitHub should still log in to their clients and reset two-factor authentication if they enabled it. The registry signing key had not yet been replaced and was among the credentials the attacker might have read.
A separate security report about the same vulnerability arrived by email at 19:07 UTC on Monday, after the attack ended. By the following morning, maintainers had replaced every credential the attacker could have accessed except the registry signing key. The incident was reported Monday night to the Swedish data protection authority, the US Cybersecurity and Infrastructure Security Agency, known as CISA, and the European Union Agency for Cybersecurity, known as ENISA.
Three separate Elixir library vulnerabilities were also disclosed alongside the incident, and fixed versions were released. Ash CVE-2026-124283 affects versions 3.31.3 up to, but not including, 3.38.0, with 3.38.0 as the fix. DBConnection CVE-2026-133555 affects 1.1.0 up to, but not including, 2.10.3, fixed in 2.10.3. Flop CVE-2026-130411 affects versions from 0.8.0, with each branch vulnerable before its corresponding fixed release: 0.26.7, 0.27.3, 0.28.1 and 0.29.2.
These are separate disclosures, not additional attacks on Hex.pm. The Ash issue requires keyset pagination using a client-supplied cursor, certain sort-field types and a signing secret left at its default unset value. The DBConnection issue cannot be exploited in DBConnection alone because another component must first decode untrusted data into structures. Flop has similar conditions involving pagination cursors. Because the exploited Hex.pm issue is in the registry server rather than the Hex client, organisations running their own registry copy must deploy the server patch. For teams that need broader security support around infrastructure and systems, AEU-I provides security-first IT, infrastructure and consulting.