Pull to refresh
Logo
Hex.pm patches remote code execution after attacker reaches six servers

Hex.pm patches remote code execution after attacker reaches six servers

Force in Play

A crafted Erlang term request body gave an unauthenticated attacker command execution on six servers; Hex found no modified packages but cannot rule out database reads

Overview

Updated 45 minutes ago

On November 23, someone sent 69 crafted requests to hex.pm, the registry that Elixir and Erlang developers use to download libraries. The requests ran operating-system commands on six of its web servers.

Hex says it blocked the traffic and deployed a patched build within 20 minutes, and found no modified packages. Database reads are not logged, so the registry cannot rule out that the attacker read email addresses, password hashes, API key hashes, two-factor secrets and sessions. It replaced every credential the attacker could have reached and logged all users out.

Why it matters

Anyone who builds Elixir or Erlang software pulls from hex.pm; the flaw gave an unauthenticated attacker command execution on the registry's own servers.

Questions about this story

Free account needed to ask — your question is kept and asked for you right after sign-up. Answers are public.

No questions yet — be the first to ask.

Key Indicators

6
Web servers reached by the attacker
Six of the registry's servers ran attacker commands between 18:16 and 18:29 UTC.
69
Malicious requests sent
Hex's error tracker recorded an error for every one of them.
10.0
CVSS v4.0 severity score
Scored by the Erlang Ecosystem Foundation and recorded by ENISA as actively exploited.
0
Modified packages found
Hex checked every file written to package storage during the incident.
4
Libraries slated for hardening
plug_crypto, plug, ecto and db_connection each get a fix.

Voices

Curated perspectives — historical figures and your fellow readers.

Sign up to generate historical perspectives on this story.

People Involved

Organizations Involved

Timeline

11 events Latest: Today Showing 8 of 11
Tap a bar to jump to that date
  1. All exposed credentials rotated

    Today Response

    The database password was the last major secret replaced.

  2. CVE-2026-129514 published

    Today Disclosure

    The advisory covers the Erlang term decoder flaw in hexpm.

  3. Hex publishes incident report

    Today Disclosure

    The registry says no packages were modified but cannot rule out database reads, and announces a new signing system.

  4. Ash releases 3.38.0 for related flaw

    Today Fix

    CVE-2026-124283 covered crafted structs in keyset pagination cursors.

  5. Attacker sends 69 crafted requests

    Incident

    The requests reached the Erlang term body parser on every route and hit six web servers. Sentry logged an error for each one.

  6. Firewall rule blocks attacker's address

    Response

    The rule took full effect between 18:30 and 18:33.

  7. Patched build replaces every server

    Fix

    The new decoder rejects any term containing a map with a __struct__ key.

  8. AWS access key deactivated

    Response

    A replacement key had been created two minutes earlier.

  9. Outside security report arrives

    Disclosure

    The report described the same vulnerability the team had just patched.

Scenarios

1

Hex ships key-rotation signing system; mirrors come back

Likely Resolves by End of 2026

Discussed by: Hex maintainers, in the November 24 incident report

Hex said it is building a registry signing system that supports key rotation, with new client releases due 'in the coming days.' Until those ship, the maintainers told users to fetch packages only from repo.hex.pm, not from mirrors. A release would let the registry retire the signing key the attacker could have read without breaking every existing client.

2

Hex closes incident with no confirmed database reads

Uncertain Resolves by Jan 31, 2027

Discussed by: Hex maintainers and the IMY breach record

Hex says database reads are not logged, so it cannot rule out access to emails, password hashes and two-factor secrets. A follow-up finding no evidence of reads, and no reports of account takeovers, would close the incident. A confirmed read would trigger individual notifications.

3

Exposed credential data leads to account takeovers

Possible Resolves by Q1 2027

Discussed by: Hex's incident report, which flags the possible exposure

The attacker's commands could read the credentials Hex's servers used, and the registry replaced them. User passwords, API key hashes and two-factor secrets stored in the database are a separate exposure: if the attacker read them, reused or cracked credentials could reach publisher accounts and, through them, packages.

4

Plug, Ecto and DBConnection ship struct hardening

Likely Resolves by Q2 2027

Discussed by: Hex maintainers, who listed the fixes in the incident report

Hex named four library-level changes: plug_crypto should reject structs or document the risk, plug should refuse struct body params, ecto should check that a binding is a list before enumerating it, and db_connection should stop applying:log callbacks taken from stream structs. That last change is tracked as CVE-2026-133555. Each fix removes one link from the chain the attacker used.

Historical Context

3 moments from history that rhyme with this story — and how they unfolded.

January 2013

Ruby on Rails parameter-parsing RCE (2013)

Rails parsed XML and YAML request bodies into Ruby objects before authentication. A crafted body could instantiate arbitrary classes, and researchers showed it could run code. The Rails team shipped emergency releases in January 2013.

Then

Administrators patched within days, and exploit code circulated quickly.

Now

Rails restricted automatic parsing of request bodies, and the flaw became a standard example of deserialization risk in web frameworks.

March 2017

Apache Struts 2 content-type RCE (2017)

A flaw in how Apache Struts 2 parsed the Content-Type header let an unauthenticated request evaluate OGNL expressions. Apache shipped a patch in March 2017.

Then

Many organizations did not apply it; the flaw was used in the Equifax breach that year.

Now

It became the reference case for unpatched framework flaws leading to mass data loss.

December 2021

Log4Shell (2021)

A lookup feature in the Log4j 2 logging library let a logged string trigger a remote class load. The flaw was disclosed on December 9, 2021, with a CVSS score of 10.0.

Then

Attackers scanned for vulnerable servers within hours, and vendors shipped emergency patches.

Now

It led to software bill-of-materials requirements and a U.S. Cyber Safety Review Board report.

Sources

(5)