An attacker ran operating system commands on six Hex.pm web servers on Monday evening, and the team behind the Elixir and Erlang package registry had every server on a patched build 15 minutes after the first malicious request. Its incident report is a rare public case study in fast containment, and in what one logging gap costs afterwards.
What happened
From 18:16 to 18:29 UTC on 23 November 2026, two IP addresses sent 69 exploit requests to hex.pm, the public registry that Elixir, Erlang and Gleam projects pull their dependencies from. The requests abused a pre-authentication flaw, now tracked as CVE-2026-129514 and rated CVSS 10.0, to execute commands as the service account running the application. Six web servers were affected. Three of them were fresh machines that a restart at 18:28 brought up on the vulnerable build.
Sentry, the team’s error tracker, logged the first failure at 18:16:00 because each exploit request threw an exception. Engineers were acting on servers by 18:23, a firewall block was added at 18:27, and all web, worker and job servers had been rebuilt from a fixed image by 18:31. The servers’ AWS access key was deactivated at 18:49, after a replacement was created, and a researcher’s report of the same bug arrived by email at 19:07.
That night the maintainers notified IMY, the Swedish data protection authority, filed a report with CISA and sent an early warning to ENISA. By mid-morning on 24 November almost every credential the attacker could have read had been rotated. The exceptions were a few low-impact secrets and the registry signing key, which cannot be changed until a new signing system ships.
The team says it found no altered packages, no unexpected database writes and no sign of lasting access. What it cannot rule out is that data was read: email addresses, bcrypt password hashes, API key hashes, two-factor secrets, sessions and audit logs all sat in a database whose reads were not logged.
The technical picture
The root cause is a deserialisation problem. Hex accepted request bodies in Erlang’s binary term format and decoded them with a function from Plug.Crypto that is designed to refuse dangerous terms such as functions and new atoms. It did not, however, inspect maps. In Elixir a struct is simply a map carrying a __struct__ key, so an attacker could send data that the runtime treated as a genuine struct of any loaded module, with every field under their control. Because the parser ran ahead of routing and authentication, any unauthenticated POST with the Hex Erlang content type, to any path, could reach it.
The forged struct did nothing harmful on its own. Instead it triggered an error, and the error-handling path did the damage: logging and error reporting called inspect on the request data, which dispatched to code chosen by the attacker. A chain through Ecto’s query inspection and a DBConnection stream eventually executed a module, function and argument tuple taken straight from the request. According to the git history, the safety check that would have blocked this was removed on 23 February 2016, so the bug sat in production for over ten years.
The fix, commit 379b0a2, rejects any decoded term that contains a struct key and returns HTTP 400. Wider hardening is under way in plug_crypto, plug, ecto and db_connection, the last tracked as CVE-2026-133555. During the investigation the team found the same class of flaw in the Ash framework’s keyset pagination (CVE-2026-124283), fixed in ash 3.38.0, and The Hacker News reports that the Flop library disclosed a related issue. Both need specific conditions to be exploitable.

Why it matters for UK organisations
Elixir and Erlang run in plenty of production back ends, and UK engineering teams that use them fetch from repo.hex.pm on every build. The immediate risk is phishing using possibly exposed account emails. The longer-tail risk is the unrotated signing key. Until the new Hex client arrives, any third-party mirror is a place where tampered packages could be served with a valid-looking signature.
The bigger lesson is for incident responders. The Cyber Security and Resilience Bill is set to tighten incident reporting for in-scope service providers, and UK GDPR already expects personal data breaches to reach the ICO within 72 hours. Hex.pm notified three authorities within about five hours. Many organisations would struggle to match that, with the evidence behind it.
Expert view
What stands out to me is that detection came from an application error tracker, not a security product. The exploit worked by causing exceptions, and someone was watching. In my experience most SOCs never ingest those signals, yet a sudden burst of unusual errors on an internet-facing service is one of the cheapest early warnings available.
The verification work deserves credit too. The team restored a database snapshot from two minutes before the first request and compared every row against live data, reconciled every package and registry file against stored checksums, and matched object-storage writes to known publishing activity. That turns “we found nothing” into a defensible statement.
The honest limits are just as instructive. Database reads, shell commands and environment variable access were not logged, so the team cannot say whether secrets were taken. When we test, logging around data reads is nearly always the first thing sacrificed to cost and noise. The restart that spun up three more vulnerable servers mid-attack is another quiet warning: autoscaling and rolling restarts will happily redeploy the flaw you are trying to contain unless the golden image is fixed first.
Finally, the attack pattern itself matters. In the days before the attack, the same addresses repeatedly downloaded hex.pm’s own dependencies, which the team reads as the attacker building a local copy to rehearse against. Open source makes that easy, so pre-authentication parsing and error-handling paths deserve the scrutiny we give login pages.
What to do now
- Hex account holders: change your hex.pm password, reset two-factor authentication through a new authenticator entry, store the new recovery codes and re-authenticate your clients. Users who only fetch public packages without an account have nothing to reset.
- Build pipelines: fetch only from repo.hex.pm, disable third-party mirrors for now, and update Hex, rebar3 or Gleam as soon as the release with the new signing system ships (Cyber Essentials: security update management).
- Self-hosted registries: anyone running their own hexpm instance should deploy the fix immediately, because the flaw sits in the server code rather than the client.
- Elixir applications: patch Ash, Flop and db_connection, and audit any endpoint that decodes Erlang terms or client-supplied cursors from untrusted input (secure configuration).
- Detection: send application exception rates and error-tracker alerts to the SOC, and alert on spikes from single sources against internet-facing services.
- Logging and drills: check you could answer “what did the attacker read?” for sensitive databases and buckets, and rehearse rebuilding from a fixed image so restarts cannot reintroduce a vulnerable build.
Bottom line
Hex.pm was breached through a decade-old deserialisation gap but contained the attack in a quarter of an hour and showed its working in public. Copy the speed, the evidence-led verification and the prompt reporting. Then check whether your own logs would leave you as unsure about data reads as the Hex team admits it is.