Table of Contents
The Hex.pm security incident began on November 23, 2026, when an unauthorized third party used a critical flaw to run commands on the web servers of the Erlang and Elixir package registry, according to the Hex.pm incident report. The flaw is tracked as CVE-2026-129514 and carries a CVSS score of 10.0.
The attacker sent 69 malicious requests over about 13 minutes and reached six production web servers, as The Hacker News also reported. The Hex.pm team says it found no evidence that any package was modified, but it cannot rule out that the attacker read data from the database.
Anyone who has a Hex.pm account, publishes Elixir or Erlang packages, or runs builds that pull dependencies from the registry should pay attention. Teams that host their own copy of the hexpm server code should also check their exposure.
Hex.pm Security Incident: Key Takeaway
- A safety check removed in 2016 was missing from the registry’s request decoder, an attacker used it to run commands, and every Hex.pm user now needs to reset their password and two factor setup.
This section contains affiliate links; we may earn a commission at no cost to you.
Keep credentials organized after a reset. Passpack is a password manager that can help you store the new passwords you create after an incident like this one.
Know which dependencies carry known flaws. Tenable offers vulnerability management that helps teams track weaknesses across their software and systems.
What Happened: Attack on the Hex.pm Registry
Hex.pm is the public package registry for the Elixir and Erlang ecosystems. Developers use it to publish and download libraries.
Hex.pm Security Incident: Attack Timeline
All times below are UTC on November 23, 2026, as given in the incident report.
- 18:16: the first exploit request arrives.
- 18:16 to 18:29: 69 malicious requests come from two IP addresses, and files created by the commands appear on six web servers.
- 18:27: a firewall rule to block the attacker is added.
- 18:30 to 18:31: every Hex.pm server is replaced with a patched build.
- 19:07: a separate email arrives with a security report describing the same flaw.
- 22:58 to 23:26: the team reports the breach to the Swedish data protection authority, to CISA and to ENISA.
The CVE record was published on November 24, 2026. The team also notes that the attacker repeatedly downloaded Hex.pm’s own dependencies from November 19, which suggests they built a local copy to test against.
Technical Details of CVE-2026-129514
The registry accepted request bodies in an Erlang data format. The decoder that read them ran before routing and before authentication, so an unauthenticated POST request could reach it.
The decoder refused dangerous terms such as functions. However, it still accepted maps that carried a __struct__ key. That let a request pose as any Elixir struct (a typed data record) the application had loaded.
According to the GitHub security advisory, the result was unauthenticated remote code execution (running commands from afar) as the user of the Erlang runtime process. The CNA record for CVE-2026-129514 classes the weakness as CWE-502, deserialization of untrusted data, and says the flaw was actively exploited against Hex.pm on November 23, 2026.
The Hex.pm team says the safety check was removed from the code on February 23, 2016. The affected window for the hosted service therefore runs from that date until the fix on November 23, 2026.
The Exploit Chain and the Fix
The team describes the chain in steps:
- The attacker posts a crafted request body to any address on the site.
- The decoder accepts a forged struct because of the
__struct__key. - The application reports an error and inspects the struct, using the Ecto and DBConnection libraries.
- That inspection ends up calling a function the attacker chose, which runs operating system commands.
The fix, commit 379b0a2, makes the decoder return an error for any term that contains a map with a __struct__ key. The advisory lists the affected range for the code repository as the commit ab1bbce up to, but not including, 379b0a2.
Two related library issues came out of the investigation:
- Ash, CVE-2026-124283: a forged pagination cursor can lead to code execution or SQL injection. Affected versions are 3.31.3 up to but not including 3.38.0, according to the Ash CNA record.
- db_connection, CVE-2026-133555: affects versions 1.1.0 up to but not including 2.10.3. The db_connection advisory says the issue is not exploitable in db_connection alone.
Who Is Affected
All Hex.pm account holders are affected, because the team cannot rule out database reads. The database holds email addresses, password hashes, API key hashes, two factor secrets and session data, according to the incident report.
Private package owners should also take note. The team says it cannot fully rule out that a private package was read through direct cloud storage access, which is not logged.
Operators who run their own hexpm registry server are affected until they deploy the fix. Projects that use Ash or db_connection in the versions above should also upgrade.
Steps Administrators Can Take
The steps below come from the Hex.pm team.
- Change your Hex.pm password.
- Reset two factor authentication by setting up a new authenticator app, then store the new recovery codes.
- Log in again from your tools with
mix hex.user authorrebar3 hex user auth, since all sessions and tokens were signed out. - Update the Hex client when the release with the new registry signing system ships, which the team expects within days.
- Until then, fetch packages only from repo.hex.pm and avoid third party mirrors.
- Be wary of emails that claim to come from Hex, and forward suspicious messages to [email protected].
- Upgrade Ash to 3.38.0 or later and db_connection to 2.10.3 or later.
The team says API keys do not need replacing, because they are random 128 bit values stored as HMAC hashes.
Implications
Registry Trust Now Rests on One Key
The registry signing key was among the secrets the attacker could have read, and it had not been replaced when the report was written. The team is building a new signing system with key rotation. Until clients adopt it, trust in registry content depends on a key that may have been exposed.
Old Code Can Hide Critical Flaws
A check removed in 2016 stayed unnoticed for more than ten years. Package registries sit at the start of the software supply chain, so a flaw like this has an outsized reach. Defenders should treat registry credentials and build systems as high value targets.
Logging Gaps Limit What Can Be Proven
The team could verify package integrity by comparing database tables against a copy taken two minutes before the first exploit request. It could not prove that data was not read, because database reads and direct storage reads were not logged. Teams should ask which of their own systems log reads of sensitive data.
Fast Response Cut the Exposure Window
The team had every server on a patched build about 15 minutes after the first malicious request. Prepared incident response and quick credential rotation reduced the damage, even though some questions remain open. Readers who want background on how such events unfold can see our coverage of the npm supply chain attack and of malicious PyPI packages.
This section contains affiliate links; we may earn a commission at no cost to you.
Support for incident response. CrowdStrike provides AI native cybersecurity software and incident response services for teams that need help investigating a possible compromise.
Looking Forward
The Hex.pm team still has work ahead. It plans to ship the new signing system and updated Hex clients, and it lists further hardening fixes as in progress. The registry signing key is the main open item.
Several questions remain unanswered. The identity of the attacker is not known. The team has not said whether any database data was read, and it says it cannot prove either way. Whether private packages or documentation archives were accessed also cannot be confirmed from the logs.
Questions Worth Answering
What is the Hex.pm security incident?
- On November 23, 2026, an unauthorized party exploited a critical flaw in the Hex.pm registry servers and ran commands on six web servers.
What is CVE-2026-129514?
- It is a remote code execution flaw in the hexpm server code, scored CVSS 10.0, caused by deserialization of untrusted data in a request body decoder.
Were Hex.pm packages tampered with?
- The team says it found no evidence of package modification. It checked database tables, 23 releases published during the attack and the written package and registry files against its records.
Was my Hex.pm data stolen?
- The team cannot rule it out. It says the database, which holds email addresses, password hashes, API key hashes and two factor secrets, may have been read.
Do I need to change my Hex.pm password?
- Yes. The team asks every user to change their password and reset two factor authentication.
Do I need to rotate my Hex.pm API keys?
- The team says no. It states that the keys are random 128 bit values stored as HMAC hashes.
How long was the flaw present?
- The safety check was removed on February 23, 2016, so the hosted service was affected until the fix on November 23, 2026.
Is the Hex client affected?
- The exploited flaw is in the hexpm server code, not the client. Users still need to update the client once the new signing system release is published.
Is it safe to download packages from Hex.pm now?
- The team says to fetch packages only from repo.hex.pm and avoid third party mirrors until the new client release arrives. It also says it found no evidence of package changes.
Who was behind the attack?
- The attacker is unknown. The report notes activity from the two IP addresses going back to November 19.
This section contains affiliate links; we may earn a commission at no cost to you.
More tools worth a look: 1Password for logins, Optery for personal data removal and EasyDMARC for spoofed email.