If you use Hex

Hex found no evidence that packages or the database were changed. It could not rule out that the attacker read account data, because the database did not log reads. Hex asks users to:

  1. Change your hex.pm password. If you used it on another site, change it there too.
  2. Reset two-factor authentication in the hex.pm security settings. Choose "Setup New App" and save the new recovery codes.
  3. Update your Hex client when the version with the new registry signing system is available. Use mix local.hex --force. If you use rebar3 or Gleam, update them too. Until then, only download packages from repo.hex.pm, not from other mirrors.
  4. Watch for fake emails. Before you sign in, check that the link goes to hex.pm.

Data that may have been read includes email addresses, password hashes, API key hashes, two-factor secrets, sessions and audit logs. Hex does not plan to change every API key because it stores them as hashes of long, random values. You can still replace your keys if you want to be extra careful.

What happened

On 23 November 2026, an attacker sent 69 harmful requests between 18:16 and 18:29 UTC and ran commands on six web servers. Hex blocked the traffic and replaced all its servers with a fixed version by 18:31. The flaw is tracked as CVE-2026-129514.

Hex compared the live database with a copy from just before the attack and found no unexplained changes. It also matched all 23 releases published during the attack with its audit logs. A change that was made and reversed before this check would not show up in the comparison.

How the attack worked

Several small problems worked together:

What went wrong What could help
The server read a special data format before it checked who sent it Check access first. Turn off formats you do not need
The data could create internal object types, called structs Accept only simple data and reject structs
An error included the attacker's data Keep untrusted data out of errors
Logging tools ran code while displaying that data Turn data into safe, simple text before logging it
A library used a function chosen by the data Never let user data choose which code to run

The function that read this data had "non-executable" in its name. It blocked many dangerous values, but still allowed structs. Hex found that a safety check had been removed on 23 February 2016.

The fix rejects any data that contains a struct and returns an HTTP 400 error. Hex also plans changes to several of the libraries involved.

Lessons for other teams

Check what runs before login

The order of your middleware matters. Data parsers, compression tools, logging and error handlers may all run before the login check. List them in the order they run, then ask which ones can read data from someone who is not logged in.

Use simple data formats

JSON is usually safer than a format that can rebuild internal objects, but you still need to check its contents. Accept only the fields and types you expect. If you work with Elixir, find every use of binary_to_term, including its safer versions, and check where the data comes from:

Examplebash
git grep -nE 'binary_to_term' -- '*.ex' '*.exs' '*.erl'

A match is not always a problem. Pay most attention to code that reads web requests, cookies, page cursors or message queues.

Check your packages too. Ash had a similar flaw in the cursors it uses for paging. Ash 3.38.0 fixes it as CVE-2026-124283. To see your current version:

Examplebash
mix deps | grep -A 2 '^\* ash '

Treat errors as another input

Error messages can contain data from an attacker. Some logging tools use custom display code for certain types of object. Limit the size of logged values, and turn them into simple data first. Include errors in your security tests.

Know what your logs can prove

Change logs helped Hex show that packages were not changed. Without read logs, it could not show what data the attacker had seen. Decide which sensitive data reads you need to log, and how long to keep those logs. Store them where a web server cannot delete them. Do not put passwords or tokens in the logs.

What scanners can and cannot find

SAST can find risky functions that turn data into objects. It may miss an attack that passes through a web framework, an error handler and several packages. SCA can tell you about known flaws in packages, but not about a new flaw in your own code. For this type of problem, also review the order in which your app handles requests, and test it with unexpected data.

Check the code your team writes

AquilaX SAST checks source code for common security problems. Included in Premium and Ultimate.

See SAST →