# Hex.pm confirms attackers ran commands on six of its servers via CVSS 10.0 flaw

An unauthenticated remote code execution flaw in the Elixir and Erlang package registry was exploited on 23 November 2026. Hex.pm says it patched affected servers within 15 minutes.

Source: https://junglewise.ai/news/hex-pm-patches-unauthenticated-rce-flaw-after-attack-on-its-own-servers  
Byline: Junglewise News Desk, https://junglewise.ai/news  
Topic: Vulnerabilities and exploitation  
Published: 25 November 2026. Updated: 27 November 2026  
Reading time: 5 min

![A cardboard box sealed with orange tape sitting on a table](https://images.unsplash.com/photo-1782405183299-f177ddb3f437?ixid=M3w0NDU4NjF8MHwxfHNlYXJjaHwzfHxjYXJkYm9hcmQlMjBwYXJjZWxzJTIwY29udmV5b3IlMjBiZWx0fGVufDF8MHx8fDE3OTU2MjI3MDd8MA&ixlib=rb-4.1.0&w=1600&q=80&fm=jpg&fit=crop)

Picture: Photo by [Giorgio Trovato](https://unsplash.com/@giorgiotrovato?utm_source=junglewise&utm_medium=referral) on [Unsplash](https://unsplash.com/?utm_source=junglewise&utm_medium=referral)

![Warehouse interior with shelving holding yellow bins and cardboard boxes](https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?ixid=M3w0NDU4NjF8MHwxfHNlYXJjaHwxfHx3YXJlaG91c2UlMjBzaGVsdmluZyUyMHN0b3JhZ2UlMjBib3hlc3xlbnwxfDB8fHwxNzk1NjIyNzY5fDA&ixlib=rb-4.1.0&w=1600&q=80&fm=jpg&fit=crop)

Picture: Photo by [Adrian Sulyok](https://unsplash.com/@sulyok_imaging?utm_source=junglewise&utm_medium=referral) on [Unsplash](https://unsplash.com/?utm_source=junglewise&utm_medium=referral)

![Warehouse shelving stacked with wrapped pallets of boxes, viewed through metal racking](https://images.unsplash.com/photo-1672552226380-486fe900b322?ixid=M3w0NDU4NjF8MHwxfHNlYXJjaHwzfHx3YXJlaG91c2UlMjBzaGVsdmluZyUyMHN0b3JhZ2UlMjBib3hlc3xlbnwxfDB8fHwxNzk1NjIyNzY5fDA&ixlib=rb-4.1.0&w=1600&q=80&fm=jpg&fit=crop)

Picture: Photo by [Arum Visuals](https://unsplash.com/@arumvisuals?utm_source=junglewise&utm_medium=referral) on [Unsplash](https://unsplash.com/?utm_source=junglewise&utm_medium=referral)

An attacker used a critical flaw in hex.pm, the package registry for Elixir and Erlang projects, to run arbitrary commands on six production servers, [The Hacker News reported](https://thehackernews.com/2026/11/hackers-exploited-cvss-100-hexpm-rce.html). The registry's maintainers detected the malicious request and patched every affected server within 15 minutes, according to the same report.

The flaw, CVE-2026-129514, carries a CVSS score of 10.0, and the registry's own [security advisory](https://github.com/hexpm/hexpm/security/advisories/GHSA-9pmm-hf4r-27pg) confirms it was actively exploited against hex.pm on 23 November 2026, the day the fix shipped. Any POST request to any route could reach the vulnerable code without authentication, and a successful exploit ended in an operating system command running as the user of the BEAM process, BEAM being the virtual machine that Erlang and Elixir code runs on. From there, the advisory notes, an attacker can read the application environment: the database URL, storage credentials, and the registry signing key, the key that vouches for the integrity of the packages the registry serves.

What the attacker did with that access has not been detailed. The advisory does not describe post-exploitation activity, and no incident report has been published saying whether any package, credential or signing key was touched. The 15-minute response time narrows the window considerably, but it does not by itself answer the question.

The flaw was not new. The affected range starts on 23 February 2016, the date a safety check was removed from the request decoder, as the git history of that decoder shows. The vulnerability therefore sat in the registry for nine years and nine months, to the day.

## What to do now

The hex.pm service itself is hosted and already patched, so there is no client-side update to install for the registry flaw. The steps below apply to anyone running the hexpm software or shipping Elixir applications built on the affected libraries.

1. If you run your own instance of hexpm, update to a build that includes commit `379b0a29bcc95164249f38ad7d772a37a8ff9533`. Treat anything older as vulnerable, including every version back to February 2016.
2. Update the `db_connection` library to 2.10.3. Versions from 1.1.0 up to but not including 2.10.3 carry CVE-2026-133555, a related high-severity issue that lets code run via the `:log` option of a forged `DBConnection.Stream` or `DBConnection.PrepareStream` struct.
3. Audit your own applications for the same pattern: any endpoint that decodes untrusted input into Erlang terms, for example with `:erlang.binary_to_term/2` or `Plug.Crypto.non_executable_binary_to_term/2`, and then builds structs from the result. The "non-executable" variant refuses functions and new atoms, but it does not stop a map carrying a `__struct__` key, which is the gap that was exploited here.
4. Reject decoded terms that contain a `__struct__` key outright, as the hexpm fix does, rather than trying to allow-list which structs are safe to forge.
5. If you host a service that holds secrets in its application environment, check whether a single process compromise would hand over signing keys and storage credentials, and whether those credentials can be rotated quickly.

## Technical details

CVE-2026-129514 is a deserialization of untrusted data issue (CWE-502) in `HexpmWeb.ErlangFormat.decode/1`, the function that handles request bodies with the content type `application/vnd.hex+erlang`. It decoded them with `Plug.Crypto.non_executable_binary_to_term/2`, which permits maps containing a `__struct__` key to pass through. That allows struct forgery: an attacker supplies a value that the application then treats as a trusted internal data structure.

The advisory describes the chain that turned that into command execution. `Plug.MethodOverride` was used to get the request to the right place, the `Inspect` implementation of `Ecto.Query.DynamicExpr` provided the gadget, and a forged `DBConnection.Stream` struct carried it to an `apply/3` call with attacker-controlled module, function and arguments. `apply/3` calls whatever it is told to call, which at that point means an operating system command running as the BEAM process user.

The parser ran ahead of the router and authentication. There was no need to find an exposed endpoint or hold valid credentials: any POST to any route reached the decoder.

Affected versions run from 23 February 2016 until the patch on 23 November 2026, which corresponds to hexpm commit `379b0a29bcc95164249f38ad7d772a37a8ff9533`. The fix makes `decode/1` return an error when any map in the decoded term contains a `__struct__` key, so such requests now get a 400 response. The vulnerability was credited to maennchen, with ericmj and maennchen developing the remediation and PJUllrich listed as an analyst.

The related library issue, [CVE-2026-133555](https://github.com/elixir-ecto/db_connection/security/advisories/GHSA-gmmq-fw75-wq46), carries CVSS 8.9 and affects `db_connection` versions greater than or equal to 1.1.0 and less than 2.10.3. It is a CWE-470 issue, use of externally controlled input to select a class or code, and it is not exploitable in `db_connection` on its own: it needs a downstream component that decodes untrusted input, for example via `:erlang.binary_to_term/2`, and builds structs from it, which is precisely what hex.pm's Erlang term parser did. The advisory explains why the record exists at all, stating that "This record exists because the struct was used in attacks on such components." The patched version is 2.10.3.

The `db_connection` advisory also cross-references CVE-2026-124283, which allows code execution and SQL injection through struct-wrapped values in a forged Ash keyset pagination cursor, alongside the hex.pm flaw. The common thread is one mistake in three places: trusting that a decoded map which claims to be a struct really is one.

No indicators of compromise have been published, and no attacker has been named. Whether packages, credentials or the registry signing key were affected in the hex.pm incident remains unstated.

## What changed

- 27 November 2026: Further sources have confirmed the main details.
- 26 November 2026: Confirmed that the attacker ran commands on six hex.pm production servers and that the team patched them within 15 minutes of spotting the malicious request.

## Related articles

- [Critical SQL injection flaw reported in DIGIT, the e-government platform used in ten countries](https://junglewise.ai/news/critical-sql-injection-flaw-reported-in-digit-the-e-government-platform-used-in)
- [NFS2ROOT: 12-year-old Linux NFS server flaw hands attackers root](https://junglewise.ai/news/nfs2root-12-year-old-linux-nfs-server-flaw-hands-attackers-root)
- [4HTTP2SHELL: public exploit gives command execution on unpatched Cacti servers](https://junglewise.ai/news/4http2shell-public-exploit-gives-command-execution-on-unpatched-cacti-servers)
- [Drupal installer flaw under active attack, second patch released](https://junglewise.ai/news/drupal-installer-flaw-under-active-attack-second-patch-released)
