Skip to content

Response, New York. Noah Park: Check Point Patches Actively Exploited Management Server Path Traversal. Detection, Dallas. Ava Okello: Report Finds Nearly Half of Deployed Detections Need Attention Before SOCs Can Trust Them.

SOCtember

Always First. Fast SOC News.

The Hex blog post titled Security incident on hex.pm, dated Nov. 24, 2026 and written by Peter Ullrich, Jonatan Männchen and Eric Meadows-Jönsson, opening with the statement that an unauthorized third party exploited a vulnerability that let them run commands on hex.pm web servers.
Image: Hex (fair use), its Nov. 24, 2026 incident report.

Response

Hex.pm Says an Attacker Ran Commands on Six of Its Servers Through a Flaw That Sat in Its Code Since 2016, and Tells Elixir and Erlang Developers to Reset Passwords and 2FA and Stay Off Package Mirrors

The package registry for Elixir and Erlang says 69 unauthenticated requests over 13 minutes on Nov. 23 turned forged structs in Erlang-format request bodies into command execution. It found no tampered packages or database changes, but cannot rule out that password hashes, 2FA secrets and session data were read.

Noah Park, ResponseNew York6 min read

NEW YORK - An attacker ran operating system commands on six of the web servers behind hex.pm, the package registry that Elixir and Erlang developers pull their dependencies from, by sending forged data to a request parser that had been reachable without a login since 2016, the registry's maintainers said in an incident report published on Tuesday.

The attack lasted about 13 minutes on the evening of Nov. 23, Coordinated Universal Time. Hex says it found no evidence that packages were altered, that its database was changed or that the intruder kept a foothold. But it also says it cannot see everything. "Because database reads are not logged, we cannot rule out that the attacker accessed data stored in the database, including email addresses, password hashes, API key hashes, 2FA secrets, sessions, and audit logs," wrote Peter Ullrich, Jonatan Männchen and Eric Meadows-Jönsson.

The flaw is tracked as CVE-2026-129514 and carries the maximum severity score of 10.0 in the project's GitHub advisory, which says it "was actively exploited against the hex.pm service on 2026-11-23."

Thirteen minutes, 69 requests

According to Hex's timeline, the attacker sent 69 malicious requests between 18:16 and 18:29 UTC. The registry's error tracker, Sentry, logged an error for every one of them, and Hex's first response on the servers began at 18:23:55. A firewall rule went in at 18:27, and by 18:31 every hex.pm server had been replaced with a patched build. A restart at 18:28 had briefly brought up three new servers still running the vulnerable code, which is why six machines were hit rather than three.

The Timeline section of Hex's incident report, listing in UTC the 69 malicious requests between 18:16 and 18:29 on Nov. 23, 2026, the firewall rule at 18:27, the patched build on all servers by 18:31, the AWS access key deactivated at 18:49 and a matching vulnerability report received by email at 19:07.
Image: Hex (fair use), the timeline in its incident report.

Hex deactivated the AWS access key the affected servers used at 18:49. At 19:07, it received an outside security report describing the same vulnerability. It reported a personal data breach to IMY, the Swedish data protection authority, notified the U.S. Cybersecurity and Infrastructure Security Agency and sent an early warning to ENISA, the European Union's cybersecurity agency, the same night.

Hex also found what looks like rehearsal. Reviewing logs back to Nov. 19 for both attacking addresses, it saw repeated downloads of hex.pm's own dependencies, "which suggests the attacker built a local copy of hex.pm to test against."

A struct that was never supposed to arrive

The entry point was a custom parser for the application/vnd.hex+erlang content type. It decoded request bodies with Plug.Crypto.non_executable_binary_to_term/2 in safe mode, which blocks functions and new atoms but let through maps carrying a __struct__ key. In Elixir, that is all a struct is, so an attacker could hand the server a value the runtime treated as a real struct of any module, with every field chosen by the attacker. Because the parser ran before routing and authentication, any unauthenticated POST to any route reached it.

GitHub security advisory GHSA-9pmm-hf4r-27pg for hexpm, titled Unauthenticated remote code execution through struct values in Erlang term request bodies, rated Critical 10.0 out of 10 under CVSS version 4, listing affected versions from Feb. 23, 2016 to before Nov. 23, 2026, and CVE ID CVE-2026-129514.
Image: GitHub / hexpm (fair use), advisory GHSA-9pmm-hf4r-27pg.

From there, the chain ran through code that handles errors. A routine lookup on the fake struct failed and raised an error with the attacker's struct in the stack trace. Sentry, the web server's error logging and the JSON log formatter then called Elixir's inspect function on that data, and inspect dispatches to whatever module the struct names. The attacker picked an Ecto query type whose inspect code enumerated a field without checking it, then placed a DBConnection stream in that field. On its error path, the stream applied a logging callback, a module, function and arguments tuple taken straight from the request. That yielded command execution as the user running the Erlang virtual machine.

The git history shows the safety check that would have stopped this was removed on Feb. 23, 2016, Hex said. The fix, commit 379b0a2, makes the decoder reject any term containing a map with a __struct__ key and return a 400 error.

The GitHub commit 379b0a2 in the hexpm repository, titled Refuse structs in Erlang term request bodies, showing a change to lib/hexpm_web/erlang_format.ex that returns an error when the decoded term is a struct.
Image: GitHub / hexpm (fair use), the fix commit.

While investigating, Hex found the same class of bug in the Ash framework, whose keyset pagination accepted crafted structs in client-supplied cursors. Ash fixed it in version 3.38.0 on Nov. 24 as CVE-2026-124283. Hex says it is also pushing hardening into plug_crypto, plug, ecto and db_connection, the last tracked as CVE-2026-133555.

What Hex checked, and what it could not

The report is unusually specific about evidence. Hex restored a copy of its database from 18:13:59, before the first malicious request, and compared every row with the live database. It matched all 23 releases published during the incident to audit log entries, and checked 62 package files and 186 registry files written since 18:00 against stored checksums. Cloud audit logs showed no new keys, accounts or API calls from the attacker's addresses, and a process listing taken before the servers were replaced showed no shells.

The gaps are just as specific. Database reads, environment variable reads and shell commands are not logged, direct reads from cloud storage are not logged, and documentation archives have no checksums to compare. One worker server's network traffic peaked at 0.47 megabytes per second against a usual maximum of 0.29.

"We found no evidence of unauthorized package modifications, or database changes, or that the attacker maintained access to our systems," the maintainers wrote.

What developers and responders should do

Hex rotated its storage, content delivery, email and database credentials and the keys that sign sessions and access tokens, which logged everyone out. It did not rotate the registry signing key and says it is building a new signing system that supports rotation, with Hex client releases due in the coming days. "Until then, don't trust third-party mirrors and fetch packages only from repo.hex.pm," the maintainers wrote.

Hex asks users to change their hex.pm passwords, which are hashed with bcrypt, and to reset two-factor authentication by setting up a new authenticator app, which issues a new secret and new recovery codes. It does not see a need to rotate API keys, which are 128-bit random values stored as HMAC-SHA256 hashes. Users should treat emails claiming to come from Hex with care and confirm links point to hex.pm.

For security teams, the practical steps are an inventory of build systems and developer machines that pull from Hex or from internal or third-party Hex mirrors, a check that CI pulls from repo.hex.pm until the new client ships, and a note to watch for Hex-themed phishing aimed at engineers. Teams running their own Elixir services that accept Erlang term format from untrusted clients should review them for the same struct-injection pattern, starting with any use of Ash keyset pagination before 3.38.0.

About the Author

Noah Park

Noah Park covers incident response, containment, and blue-team operations for SOCtember from New York.

Related stories

Response desk