Monday's attack ran commands on six Hex.pm servers
An unauthenticated RCE in Hex.pm, present since 2016, let attackers run commands on six registry servers before maintainers patched within 15 minutes.
On Monday an attacker ran operating system commands on six of Hex.pm’s production web servers, the registry Elixir and Erlang projects pull their dependencies from. The maintainers had every server on a patched build within about 15 minutes of the first malicious request. Load balancer logs recorded 69 exploit requests between 18:16 and 18:29 UTC, all from two addresses, and files written by the exploit showed up on six machines, in one case 3 milliseconds after the request arrived. Three of those servers joined the attack mid-stream, when a restart brought up machines still running the vulnerable build.
The flaw, CVE-2026-129514, carries the maximum CVSS score of 10.0, and it had been in the code since February 23, 2016.
The parser ran before authentication
The vulnerability sat in the parser Hex.pm used to decode request bodies sent in an Erlang data format. That parser ran before routing and authentication, so an unauthenticated POST to any URL on the site reached it. The decoder was meant to be safe, and it did block dangerous terms such as function references, but it accepted maps carrying a __struct__ key. That let a request body impersonate any Elixir struct the application had loaded.
The crafted struct executed nothing on its own. It triggered an error, and the error-reporting code then inspected the struct. That inspection path, running through the Ecto and DBConnection database libraries, reached a point where the server called a function the attacker named, which ran shell commands under the registry’s service account. The safety check that would have rejected the struct was removed on February 23, 2016, which is where the flaw’s age comes from. The team says there is no evidence anyone exploited it before Monday, and traffic from the two addresses going back to late last week suggests the attacker built a local copy of Hex.pm to test against first.
What they could and couldn’t verify
The packages themselves appear intact. The team compared every database table against a snapshot taken two minutes before the first exploit request and traced each difference to normal activity. The 23 releases published during the attack window all match the audit log, no older release was altered, and the package and registry files written that evening match the database records.
Data access is the part they cannot verify. Database reads, shell commands, environment variables and direct reads from file storage were never logged, so the team states plainly that it cannot rule out that the attacker read the database. That database holds email addresses, password hashes, API key hashes, two-factor secrets and session data, and private packages could have been read without leaving a trace. The checks turned up no leftover shells, no new accounts, and no new cloud keys in the audit logs. The attacker is unknown. The breach was reported Monday night to the Swedish data protection authority, CISA, and ENISA.
If you have a hex.pm account
Everyone was logged out, because the maintainers rotated the keys that sign sessions and access tokens. Account holders should:
- Change your hex.pm password. Passwords are bcrypt-hashed, which slows guessing but does not save a weak one.
- Reset two-factor authentication by creating a new authenticator entry, and store the new recovery codes.
- Re-authenticate your client with
mix hex.user auth, orrebar3 hex user authfor Erlang projects. - Update the Hex client when the next release ships, expected within days, which carries a new registry signing system.
- Treat any email about Hex as a possible phishing lure, since exposed addresses may be misused. Check that links point to hex.pm.
API keys do not need replacing. They are random 128-bit values stored only as HMAC-SHA256 hashes, which the team says cannot realistically be brute-forced. If you signed up through GitHub, log back in and reset 2FA if you had it enabled. If you never created an account and only pull public packages, there is nothing to reset, per maintainer Peter Ullrich.
One caveat applies to everyone fetching packages right now: the registry signing key has not been rotated yet, and it was among the credentials the attacker could have read. By yesterday morning the team had replaced every other credential in that set. Until the new client ships, fetch only from repo.hex.pm and avoid third-party mirrors.
If you run your own copy of the registry, the flaw is in the hexpm server code, not the Hex client, so you are exposed until you deploy the patch. The fix commit makes the decoder reject any term containing a map with a __struct__ key.
Separately, maintainers of three Elixir libraries disclosed their own struct-from-untrusted-data flaws and shipped fixes yesterday. These are not further attacks on Hex.pm, and each needs specific conditions. The db_connection flaw is not exploitable in db_connection alone, per its advisory, because another component must first decode untrusted data into structs. The Ash flaw requires keyset pagination with a client-supplied cursor, certain sort field types, and a signing secret left at its default. Flop’s flaw has similar conditions around its pagination cursors.
A separate security report describing the same flaw arrived by email at 19:07 UTC on Monday, after the attack had already ended.
Keep Reading
vulnerabilityCISA adds exploited Puppet Server RCE to KEV catalog
CVE-2026-115731 is a CVSS 9.4 deserialization RCE in Puppet's report-processing code, now in CISA's KEV catalog after reports of active exploitation.
javaBuffer overflow in OpenJDK's Base64 decoder enables unauthenticated RCE
Java4Shell (CVE-2026-114938) is a Base64-decoder overflow in OpenJDK 17, 21, 25 and 27 that can give pre-auth RCE on x86-64 CPUs with AVX-512 VBMI.
puppetCISA flags exploited Puppet bug enabling CA key theft
CISA added CVE-2026-115731, a 9.4 Puppet deserialization RCE, to its KEV catalog amid active exploitation. Patch, and consider rotating the CA key.
Latest on the Wire
Full wire →- 12-Year NFS Flaw Enables Unauthenticated Remote RootHacker News
- 1Password Breached Via GitHub; Customer Data, Source Code ExposedThe Hacker News
- AI-Powered Santa Payphone Debuts on Norfolk IslandHacker News
- Archived UI Style Guides Span Four Decades of ComputingHacker News
New signal daily · RSS
Stay in the loop
New writing delivered when it's ready. No schedule, no spam.