Hex.pm Breach: Reset Your 2FA and Check Where Your Builds Download
The Hex.pm breach means password and 2FA resets for developers. Check your build's package source while a new registry signing system is pending.

The Hex.pm breach needs action even if your Elixir build still passes. Hex's November 24 incident report says an attacker ran commands on its servers on November 23. The team found no evidence of unauthorized package modifications, but cannot exclude database reads because those reads were not logged. It asks users to change passwords, reset authenticator-based two-factor authentication, and use only repo.hex.pm while a new registry signing system is prepared.
Our recommendation: handle the account reset and the build's download route as two separate jobs. A green dependency install answers neither question. You can check both without deleting your lockfile, disabling signature verification, or treating every package as malicious.
What the Hex.pm breach does—and doesn't—establish
The published investigation is evidence of a registry compromise, with limits on what investigators can reconstruct. Its account-data warning includes password hashes and 2FA secrets. Possible exposure is enough reason to replace those protections; it does not establish that every user's data was copied. Investigation and limits.
For authenticator reset, Hex directs users to Authenticator App → Setup New App on the security dashboard, then to verify the new entry and retain the new recovery codes. Its report still describes the registry-signing client releases as forthcoming. At our November 25 check, the official Hex releases page still listed 2.7.0, released November 6, as latest. That version predates this incident; installing it is not evidence that the promised signing migration has arrived.
The operational distinction is simple: restore control of your account now, and track the client migration as a follow-up with an owner. Otherwise, “we updated Hex” can become a checked box for a change that was not available yet.
An error message became part of the attack path
The critical advisory for CVE-2026-129514 identifies unauthenticated remote command execution in the registry's Erlang-term request parser. Parsing happened before routing and authentication. An incoming request could supply maps with a __struct__ key; subsequent protocol dispatch treated those maps as particular Elixir structs. Error reporting inspected the resulting data, and a chain through Ecto and DBConnection reached a command-execution path.
The advisory concerns the Hex registry application, not a claim that installing any Hex package gives an attacker this capability on your laptop. If you operate a copy of the registry, compare your deployed revision with the fixed commit, 379b0a2. The advisory's affected range begins in February 2016 and ends with the November 23 patch.
Why should application developers care? Because the sensitive operation was reached while trying to describe a failure. Elixir's Inspect documentation explains that the protocol customizes how data structures appear in logs and terminals. Inspection is an operation with implementations, rather than a guarantee that arbitrary input becomes inert text.
A useful code-review question follows: what code runs when an invalid request is logged? Follow the rejected request through your error tracker, formatter, exception renderer, and any custom serialization. A handler can reject an input and still hand that input to another component with more behavior than the handler expected.
“Non-executable” wasn't a complete input policy
The name non_executable_binary_to_term sounds reassuring. Its current Plug.Crypto documentation says it excludes executable terms such as anonymous functions, while warning that other decoded structures can still lead to custom code being invoked. The documentation recommends signing or encrypting data sent through an untrusted party and verifying it on receipt.
That gives developers a better review target than searching only for obviously dangerous functions. Write down the data shape an endpoint intends to accept. Then ask what behavior the decoded value can select before that shape is enforced. A function that prevents one dangerous representation cannot establish the trustworthiness of every value accepted by the application around it.
The registry's patch rejects a decoded term if a map anywhere inside it contains a __struct__ key. The traversal covers map keys and values, lists, and tuples. Its tests include nested structures as well as a valid ordinary-data example. We reviewed that diff; we did not reproduce the exploit.
Our takeaway from that change is a test-design choice: include rejected values inside otherwise valid containers. A top-level-only test can pass while a nested value still crosses the same boundary. Also retain a valid-data case so the test demonstrates the intended format remains usable.
Check where CI actually gets packages
Start in the same runner or container that fetches dependencies. Hex's repository command documentation identifies hexpm as the default repository and https://repo.hex.pm as its default URL. This read-only command displays that repository's configured URL:
mix hex.repo show hexpm --urlThen review overrides. Hex's configuration reference documents mirror settings and gives environment variables precedence over project and global configuration. A trusted mirror can receive authentication information. That makes a developer's local result an incomplete answer for a separately configured CI runner.
The Hex 2.7.0 source also accepts the shorter HEX_MIRROR and HEX_TRUSTED_MIRROR aliases. Here is a small Python check for those names and selected verification overrides. It prints names only, so a mirror URL containing credentials never appears in its output:
python3 - <<'PY'
import os
names = (
"HEX_MIRROR_URL", "HEX_TRUSTED_MIRROR_URL",
"HEX_MIRROR", "HEX_TRUSTED_MIRROR",
"HEX_UNSAFE_HTTPS", "HEX_UNSAFE_REGISTRY",
"HEX_NO_VERIFY_REPO_ORIGIN",
)
found = [name for name in names if os.environ.get(name)]
for name in found:
print(f"REVIEW: {name} is set; inspect its value privately")
if not found:
print("No selected environment overrides found; review project/global config too")
PYWe tested this snippet with synthetic environments: no overrides, both mirror naming forms, and a verification override. It reported the expected names without printing values. We did not run an authenticated Hex account or a production Elixir build. The snippet is deliberately a prompt for review: a variable set to false is still reported, and an empty result does not inspect project settings, global settings, other repositories, or the network path.
Use that narrow result to make a concrete decision. If the job has a mirror override, have its owner verify and adjust the route before the next dependency fetch. If it has a verification override, inspect the actual value. Hex documents settings that disable HTTPS certificate, registry-signature, or registry-origin checks; enabling those bypasses is the wrong way to make a security-related install failure disappear. Verification settings.
What to do before your next release
- Reset the publishing account's password and authenticator setup. Type the official site address yourself, complete the new setup, and replace the stored recovery codes. Assign each account holder their own reset rather than assuming the organization administrator's reset covers everyone.
- Record the actual dependency-fetch configuration. Check the CI job as well as local machines. Keep the repository URL and the review outcome; keep credentials out of tickets and logs.
- Audit the application's dependencies separately.
mix hex.auditreports known advisories and retired dependencies. It can identify package-version work, but its success does not verify that your account reset is complete or resolve this incident's unobserved database reads. - Give the signing-system update a follow-up owner. Check the official incident report and release notes for the migration, then update each relevant toolchain and verify a dependency fetch. Record the version actually installed rather than closing the task after running an update command.
For the next application review, bring one malformed-input case to the team and trace its error path. Decide which plain data the endpoint accepts and verify that logging a rejected value cannot select unexpected behavior. That is a manageable follow-up to this breach—and a more useful engineering task than simply asking whether your stack contains Elixir.


