Security

Hacked by its own error report: hex.pm unauthenticated RCE via forged Elixir structs (CVE-2026-129514)

Artem Safonov
Artem Safonov , Threat Analyst
Hacked by its own error report: hex.pm unauthenticated RCE via forged Elixir structs (CVE-2026-129514)
Cover © Anonhaven

On November 23, 2026, an attacker ran operating system commands on six hex.pm web servers. No account was needed. The hex.pm vulnerability behind the break-in, CVE-2026-129514, scores 10.0 on CVSS 4.0. It had sat in the registry's request decoder since February 2016.

The registry's own error reporting pulled the trigger. A POST body in Erlang's binary term format carried a forged Elixir struct and was built to crash. When Sentry, Bandit's error log and the JSON log formatter printed it, the chain reached an apply/3 call on values from the body.

No login, API key or user interaction is needed, and any route works. The advisory GHSA-9pmm-hf4r-27pg, published through the EEF CNA (the CVE numbering authority at cna.erlef.org), gives the vector as CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:A. The record carries CWE-502 (deserialization of untrusted data) and CAPEC-586, and it has no CVSS 3.x score. Its exploit maturity field reads "attacked", and the operator's incident report counts 69 malicious requests between 18:16 and 18:29 UTC.

Reset your hex.pm password and 2FA

The flaw was exploited against hex.pm on November 23, 2026. The operator cannot rule out that password hashes, 2FA secrets and sessions were read. Change your hex.pm password, reset 2FA and fetch packages only from repo.hex.pm until the Hex client with the new signing system ships.

What hex.pm is and who runs this code

Hex.pm is the package registry for Erlang, Elixir and Gleam projects. Its home page on November 24 listed 27,219 packages and 287,043 package versions. The counters showed 16,350,197,062 downloads in total and 10,508,155 for the previous day.

The server is open source. GitHub's hexpm/hexpm repository ("API server and website for Hex") dates from January 28, 2014. It carries an Apache-2.0 license, 1,173 stars and 313 forks.

Hexpm ships no numbered releases, so the advisory gives two ranges. The hex.pm service was exposed from 2016-02-23 until 2026-11-23. The source tree is affected from commit ab1bbcef7cc8395d1056d3b1aa6a174353492d59 up to, and not including, 379b0a29bcc95164249f38ad7d772a37a8ff9533. Self-hosted deployments fall in the second range, and no source counts them.

A body parser that runs before the router

Hex clients may send request bodies as Erlang terms instead of JSON. The content type is application/vnd.hex+erlang, and a comment in the parser says Hex has sent that format since version 0.11.0. The endpoint wires the custom parser into Plug.Parsers, ahead of the router.

  plug Plug.Parsers,
    parsers: [:urlencoded, :json, HexpmWeb.PlugParser],
    pass: ["*/*"],
    json_decoder: JSON

  plug HexpmWeb.Plugs.ValidateParams

  plug Sentry.PlugContext,
    body_scrubber: {HexpmWeb.SentryScrubber, :scrub_body},
    header_scrubber: {HexpmWeb.SentryScrubber, :scrub_headers},
    url_scrubber: {HexpmWeb.SentryScrubber, :scrub_url}

  plug Plug.MethodOverride
  plug :router

lib/hexpm_web/endpoint.ex, lines 68-80 and, separately, line 88, at commit 2621535, the parent of the fix.

Plug order decides who can reach the decoder. Plug.Parsers sits on line 68, Plug.MethodOverride on line 80 and plug :router on line 88. The advisory states that the parser handles every route before any authentication plug, so each line above the router serves anonymous traffic. Sentry is hooked into the same pipeline twice, through use Sentry.PlugCapture on line 2 and Sentry.PlugContext on lines 75 to 78.

  defp decode({:ok, body, conn}, decoder) do
    case decoder.decode(body) do
      {:ok, terms} when is_map(terms) ->
        {:ok, terms, conn}

      {:ok, terms} ->
        {:ok, %{"_json" => terms}, conn}

      {:error, reason} ->
        raise Plug.BadRequestError, message: reason
    end
  end

lib/hexpm_web/plug_parser.ex, lines 60-71, same commit.

The parse/5 clause on lines 20 to 27 accepts vnd.hex+erlang and vnd.hex+json. It reads the body and calls a decoder, which get_decoder/2 on lines 73 to 77 sets to HexpmWeb.ErlangFormat for Erlang bodies. Line 62 then settles the outcome, since a decoded map is returned whole as the body params. Plug.Parsers merges it into conn.params, and a struct is a map, so it passes is_map/1.

What the :safe decoder lets through

  def decode(binary) do
    term = Plug.Crypto.non_executable_binary_to_term(binary, [:safe])
    {:ok, term}
  rescue
    ArgumentError ->
      {:error, "bad binary_to_term"}
  end

lib/hexpm_web/erlang_format.ex, lines 17-23, same commit.

A clause on lines 13 to 15 refuses compressed terms, which begin with bytes 131 and 80. Everything else goes to Plug.Crypto.non_executable_binary_to_term/2 with [:safe], and the result returns as {:ok, term}.

  defp non_executable_terms(map) when is_map(map) do
    folder = fn key, value, acc ->
      non_executable_terms(key)
      non_executable_terms(value)
      acc
    end

    :maps.fold(folder, map, map)
  end

  defp non_executable_terms(other)
       when is_atom(other) or is_number(other) or is_bitstring(other) or is_pid(other) or
              is_reference(other) do
    other
  end

lib/plug/crypto.ex, lines 56-70, plug_crypto v2.2.1.

Plug.Crypto walks lists, tuples and maps. Atoms, numbers, bitstrings, PIDs and references pass on lines 66 to 70, and anything else, functions included, raises ArgumentError on lines 72 to 75. For a map, lines 56 to 64 recurse into keys and values and do nothing more. The string __struct__ appears nowhere in the file.

Erlang's :safe flag blocks new atoms, not existing ones. In a release, the advisory notes, every module and function name is an existing atom. A client can therefore name any loaded module under a __struct__ key and fill each field of the fake struct. Hex.pm's home page lists plug_crypto 2.2.1 third under Most Downloaded, at 8.4M.

The decoder rejected functions and new atoms, but it never checked maps. An Elixir struct is just a map with a __struct__ key naming a module.

— Peter Ullrich, Jonatan Männchen and Eric Meadows-Jönsson, authors of the hex.pm incident report

Elixir selects protocol implementations by that key alone. The sender thereby chooses which Inspect and Enumerable code runs once anything prints or enumerates the params.

Five hops from a forced crash to apply/3

No proof of concept or sample request has been published for hexpm. The walk below follows the advisory's description through the dependency versions pinned in mix.lock. Those are plug_crypto 2.2.1, plug 1.20.3, ecto 3.14.3, db_connection 2.10.2, sentry 14.0.1, bandit 1.14.1 and logger_json 7.0.4.

Hop one is the crash. Plug.MethodOverride matches every POST on lines 49 to 50 and looks up "_method" in the body params.

  defp override_method(%Plug.Conn{} = conn, body_params) do
    with method when is_binary(method) <- body_params["_method"] || "",
         method = String.upcase(method, :ascii),
         true <- method in @allowed_methods do
      %{conn | method: method}
    else
      _ -> conn
    end
  end

lib/plug/method_override.ex, lines 60-68, plug v1.20.3.

On a struct, the bracket lookup on line 61 goes through Access.get/3. That function calls fetch/2 on the module named in __struct__. The attacker named Ecto.Query.DynamicExpr, a module that defines no fetch/2. Elixir raises UndefinedFunctionError, and the top stack frame holds the forged struct as an argument.

One hexpm plug sits between the parser and that lookup. HexpmWeb.Plugs.ValidateParams on endpoint line 73 checks conn.params for NUL bytes and invalid UTF-8, and neither source mentions it. Commands ran, so it evidently let the forged params through. We did not examine Hexpm.Utils.storable_text? to see why.

Hop two is error reporting. Sentry, Bandit's error log (through Exception.format/3) and the JSON log formatter call inspect/1 on request data and stack frame arguments. For a struct, inspect/1 dispatches to the implementation of the named module, here Inspect.Ecto.Query.DynamicExpr.

defimpl Inspect, for: Ecto.Query.DynamicExpr do
  def inspect(%DynamicExpr{binding: binding} = dynamic, opts) do
    binding =
      Enum.map(binding, fn
        {{:^, _, [as]}, bind} when is_atom(as) -> {as, bind}
        other -> other
      end)

lib/ecto/query/inspect.ex, lines 6-12, ecto v3.14.3.

Line 9 calls Enum.map/2 on the binding field without checking that it is a list. Enumeration is a protocol call too, so hop three is whatever struct the sender put in binding. The attacker put a DBConnection.Stream there.

defimpl Enumerable, for: DBConnection.Stream do
  def count(_), do: {:error, __MODULE__}

  def member?(_, _), do: {:error, __MODULE__}

  def slice(_), do: {:error, __MODULE__}

  def reduce(stream, acc, fun), do: DBConnection.reduce(stream, acc, fun)
end

lib/db_connection.ex, lines 13-21, db_connection v2.10.2.

The struct on lines 7 to 8 has four fields, conn, query, params and opts. The request supplies them all. Its Enumerable implementation forwards to DBConnection.reduce/3 on line 1285. That function reads them on line 1286 and calls declare/4 on line 1289.

  defp declare(conn, query, params, opts) do
    result =
      case maybe_encode(query, params, meter(opts), opts) do
        {:prepare, meter} ->
          run(conn, &run_prepare_declare(&1, query, params, &2, &3), meter, opts)

        {:ok, params, meter} ->
          run(conn, &run_declare(&1, query, params, &2, &3), meter, opts)

        {_, _, _, _} = error ->
          error
      end

    log(result, :declare, query, params)
  end

lib/db_connection.ex, lines 1519-1533, same version.

Hop four is a failure on purpose, caught by maybe_encode/4 on lines 1470 to 1483. It returns a tuple of kind, reason, stack and meter before any database connection is checked out. declare/4 matches the tuple on line 1528 and still calls the log function on line 1532. Its meter comes from meter/1 on lines 1664 to 1669, built from the forged :log option.

  defp log({log, times}, call, query, params, result) do
    entry = DBConnection.LogEntry.new(call, query, params, times, entry_result(result))

    try do
      log(log, entry)
    catch
      kind, reason ->
        stack = __STACKTRACE__
        log_raised(entry, kind, reason, stack)
    end

    log_result(result)
  end
  defp log({mod, fun, args}, entry), do: apply(mod, fun, [entry | args])

lib/db_connection.ex, lines 1704-1716 and, separately, line 1729, same version.

Hop five is the call itself. log/5 builds a DBConnection.LogEntry and hands it to the hook. Line 1729 serves a {module, function, args} hook with apply(mod, fun, [entry | args]), and all three values came from the request body.

One constraint remains, because the log entry always takes the first argument position. The advisory says the request names an OTP standard library function that applies a trailing module, function and argument list. That inner call runs the operating system command as the user of the BEAM (Erlang virtual machine) process. Neither the advisory nor the blog names the function or the command used against hex.pm.

A sibling record is more specific. For the flop library's variant of the chain, the CVE-2026-130411 entry names :proc_lib.init_p/5 as an OTP function of that shape.

Nothing in the response gives the attack away. Elixir runs a struct's Inspect implementation inside a rescue in Inspect.Algebra, the advisory explains. The request therefore ends with the ordinary 500 for the Plug.MethodOverride error.

The check deleted on February 23, 2016

The decoder once had a guard that would have refused this body. Commit ab1bbce, titled "Fix for some bad requests", removed it. Eric Meadows-Jönsson authored the change on February 23, 2016, at 19:29:26 UTC.

@@ -15,23 +15,10 @@ defmodule HexWeb.ErlangFormat do
   def decode(binary) do
     try do
       term = :erlang.binary_to_term(binary, [:safe])
-      if safe_term?(term) do
-        {:ok, term}
-      else
-        {:error, "unsafe binary_to_term"}
-      end
+      {:ok, term}
     rescue
       ArgumentError ->
-        {:error, "unsafe binary_to_term"}
+        {:error, "bad binary_to_term"}
     end
   end
-
-  # No atoms allowed!
-  defp safe_term?(term) when is_number(term), do: true
-  defp safe_term?(term) when is_binary(term), do: true
-  defp safe_term?(term) when is_boolean(term), do: true
-  defp safe_term?(term) when is_list(term), do: Enum.all?(term, &safe_term?/1)
-  defp safe_term?(term) when is_tuple(term), do: Enum.all?(Tuple.to_list(term), &safe_term?/1)
-  defp safe_term?(term) when is_map(term), do: Enum.all?(term, &safe_term?/1)
-  defp safe_term?(_), do: false
 end

Hunk for web/erlang_format.ex in commit ab1bbce. The file before the change held the guard on lines 18-22 and 29-36.

The removed safe_term?/1 was an allowlist under the comment "No atoms allowed!". It accepted numbers, binaries and booleans, plus lists, tuples and maps built from them. When reading the old file, a struct could not pass, since its __struct__ key and its module name are both atoms.

Three files changed in that commit, with 6 additions and 19 deletions. It changed web/erlang_format.ex by +2 and -15, flipped debug_errors to false in config/hex.exs, and renamed HexWeb.BadRequestError to HexWeb.Plugs.BadRequestError in web/plug_parser.ex (+3, -3).

Back then the decoder called :erlang.binary_to_term(binary, [:safe]) directly. The move to Plug.Crypto.non_executable_binary_to_term/2 came later, at a point we did not trace.

The fix adds 18 lines to one decoder

Meadows-Jönsson committed the fix at 18:26:41 UTC on November 23. That is ten minutes and 41 seconds after the first exploit request. Commit 379b0a2, "Refuse structs in Erlang term request bodies", cites no pull request. It adds 18 lines and removes one in lib/hexpm_web/erlang_format.ex, with 14 lines of tests in test/hexpm_web/erlang_format_test.exs.

@@ -16,9 +16,26 @@ defmodule HexpmWeb.ErlangFormat do
 
   def decode(binary) do
     term = Plug.Crypto.non_executable_binary_to_term(binary, [:safe])
-    {:ok, term}
+
+    if struct?(term) do
+      {:error, "bad binary_to_term"}
+    else
+      {:ok, term}
+    end
   rescue
     ArgumentError ->
       {:error, "bad binary_to_term"}
   end
+
+  # A decoded map with a :__struct__ key is dispatched to that struct's protocol
+  # implementations, so inspecting or enumerating the params runs code chosen
+  # by the client.
+  defp struct?(map) when is_map(map) do
+    Map.has_key?(map, :__struct__) or
+      Enum.any?(map, fn {key, value} -> struct?(key) or struct?(value) end)
+  end
+
+  defp struct?([head | tail]), do: struct?(head) or struct?(tail)
+  defp struct?(tuple) when is_tuple(tuple), do: struct?(Tuple.to_list(tuple))
+  defp struct?(_other), do: false
 end

Hunk for lib/hexpm_web/erlang_format.ex in fix commit 379b0a2.

After decoding, a recursive struct?/1 walks map keys and values, list heads and tails, and tuples. Any map with a __struct__ key turns the result into {:error, "bad binary_to_term"}, which the parser converts to a 400.

The new test builds a fake struct on URI and rejects four placements. Those are bare, nested in a list and tuple, as a map key and in an improper list tail. A plain nested map must still decode unchanged.

Only the entry point is closed, and nothing behind it. One decoder serves the format, so the check covers every route, as the incident report notes. When reading the diff, we found no path that carries a struct past struct?/1. The operator says a local reproduction "confirmed the old build runs the command and the fixed build rejects the request".

By our reading of the code, the new check is narrower than the 2016 guard. struct?/1 is a denylist for one key, and atoms, PIDs and references still decode before authentication. The ecto and db_connection gadgets were untouched by this commit.

José Valim patched the last hop an hour later. Commit 9a4230a in db_connection, "Normalize log entries outside of protocol implementations", is dated 19:26:09 UTC on November 23. It changes lib/db_connection.ex by 21 additions and 5 deletions.

@@ -1737,7 +1754,6 @@ defmodule DBConnection do
 
   defp entry_result(other), do: other
 
-  defp log({mod, fun, args}, entry), do: apply(mod, fun, [entry | args])
   defp log(fun, entry), do: fun.(entry)

One of the eight hunks in db_connection commit 9a4230a, the removed log/2 clause.

A new normalize_log/1 helper turns a {mod, fun, args} hook into a closure. stream/4 and prepare_stream/4 call it when the struct is created. declare/4 and the other stream paths read the option through already_normalized_meter/1. A tuple inside a forged struct is no longer applied.

Thirteen minutes, 69 requests, six servers

Load balancer logs, reviewed up to 19:05, show the attacker's first request at 18:14:21 UTC. The first exploit request arrived at 18:16:00 and the last to reach a server at 18:29:33. Sentry recorded an error for each of the 69. The report speaks of "both attacker addresses" and publishes neither.

Commands ran on six web servers. The operator matched files created on each machine to request timestamps, and the first file appeared 3 ms after a request at 18:16:46. Three of the six were new servers that a restart at 18:28 brought up on the vulnerable build.

The operator reviewed request logs since November 19 for both attacker addresses. Logs for hex.pm, repo.hex.pm, builds.hex.pm and hexdocs.pm show repeated downloads of hex.pm's own dependencies, with no dates given. The operator reads that as someone building a local copy to test against.

An outside report arrived after the attack was over. At 19:07 the team received an email describing the same vulnerability, and the CVE record marks discovery as external. Neither source names the reporter or the attacker. The record credits Eric Meadows-Jönsson, Jonatan Männchen of the EEF, Peter Ullrich and Wojtek Mach as analysts.

Response times below are UTC, taken from the hex.pm report and the Git log.

Time (UTC) Event
Nov 23, 18:23:55First response on the servers
18:26:41Fix commit 379b0a2
18:27Firewall rule added, fully effective between 18:30 and 18:33
18:30 to 18:31All web, worker and job servers recreated from the patched build
18:33:48Firewall denies every attacker request from here, logged until 18:38
18:35Investigation of production logs and the database begins
18:47 and 18:49Replacement AWS access key created, old key deactivated
20:21Most infrastructure credentials rotated
22:58Personal data breach reported to IMY, the Swedish data protection authority
23:05Incident reported to CISA, receipt confirmed at 23:43
23:26Early warning submitted to ENISA
Nov 24, by 10:42All readable credentials rotated, database password included, except the registry signing key and a few low-impact secrets
13:48CVE-2026-129514 published

What hex.pm verified and what it cannot rule out

Hex.pm reports no evidence of modified packages, database changes or lasting access.

  • Lasting access. Staff listed running processes on the affected servers before replacing them and found no shells. Cloud audit logs show no new keys, accounts or API calls from the attacker's addresses, and no writes by hex.pm's Kubernetes service accounts.
  • Database writes. A copy restored from 18:13:59 was compared with the live database row by row, across every table. Each difference traced to an audit log entry from another address, a background job or the response itself. Tables, functions, roles and permissions showed no unexpected change. A row changed and then changed back, or overwritten by a later legitimate change, would not appear.
  • Packages. All 23 releases published during the incident match a publish or stage entry in the audit log, and no older release changed. Storage writes came only from hex.pm's own services. All 62 package files and 186 registry files written since 18:00 match the database. Documentation archives have no stored checksum to compare.
  • Storage credentials. The review covered 11,379 log objects holding 15,635 access records timed from 14:56 to 20:59. Each of the 288 versions and markers listed for 18:00 to 20:00 has a matching record within 3 seconds. Of those, 231 belong to hexpm-prod, 33 to elixir_ghactions and 24 to bob. All 6,279 hexpm-prod requests came from the three node IPs. The logs hold no DELETE.OBJECT, no request with a version ID, no ACL or tagging write, no copy and no bucket listing by hexpm-prod.
  • Private packages and docs. Reads of private packages in that window came from hex.pm's own servers and coincide with releases the same organizations published. A read from a compromised server would look the same, so hex.pm cannot fully rule one out. CDN logs show no requests from either attacker address to private docs in the last 30 days. Direct reads from cloud storage and reads of private documentation are not logged. Hex.pm says it will contact affected organizations.

Reads are the blind spot. Database reads, environment variable reads and shell commands are not logged on hex.pm's side. The operator therefore cannot rule out access to email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs. Network traffic stayed within normal levels except on one worker server, which peaked at 0.47 MB/s against a usual maximum of 0.29 MB/s.

API keys are 128-bit random values stored as HMAC-SHA256, and hex.pm sees no need to rotate them. Passwords are hashed with bcrypt, which slows guessing but does not save a weak password.

The BEAM user can read the database URL, storage credentials and registry signing key, the advisory says. Hex.pm replaced the storage, CDN, email and database credentials and the keys that sign sessions and access tokens.

One secret remains open, the registry signing key. Hex.pm is building a signing system that supports key rotation and promises new Hex client releases "in the coming days".

The flaw was absent from CISA's Known Exploited Vulnerabilities catalog in AnonHaven's November 24 CVE feed.

The same gadget in db_connection, Ash and flop

Three sibling CVEs were published within 13 hours of each other on November 24. All reuse the Ecto.Query.DynamicExpr and DBConnection.Stream pair, and all four records list Jonatan Männchen of the EEF as coordinator.

CVE-2026-133555 covers the gadget itself in db_connection, versions 1.1.0 up to 2.10.3 (advisory GHSA-gmmq-fw75-wq46). The record classes it as unsafe reflection and scores it 8.9 (CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H). Forged DBConnection.Stream and DBConnection.PrepareStream structs are both affected. The entry stresses that the bug cannot be reached in db_connection alone.

The :safe option does not reject structs, and these structs contain only plain terms. Structs of other libraries can possibly lead to the same result, so a component that decodes untrusted terms stays at risk independently of db_connection.

— EEF CNA, CVE-2026-133555 record

CVE-2026-124283 is the Ash framework's variant (GHSA-m5v6-3qwf-6w9r), found by Männchen during the hex.pm investigation. Ash.Page.Keyset.filter/4 decodes a client-supplied keyset pagination cursor, and a struct inside it reaches inspect/1 through the AshPostgres data layer. The same cursor can inject raw SQL through an %Ash.Query.Function.Fragment{} placed in an %Ash.CiString{} value.

Ash 3.31.3 up to 3.38.0 is affected under specific conditions. A read action must declare keyset? true and receive a client value as the :after or :before page option. The sort must include a :ci_string, :map, :struct or :term field, and keyset_signing_secret must be unset, the default. Zach Daniel is credited with the fix, released in 3.38.0 on November 24.

CVE-2026-130411 is the flop pagination library's variant, scored 9.2 (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N). Flop.Cursor.decode/2 decodes the after and before parameters with :erlang.binary_to_term/2 in :safe mode and accepts maps. Jonatan Männchen and Wojtek Mach are credited as finders. Cursor pagination is on by default, and the demonstrated chain used an order_by field of the Ecto type :naive_datetime.

Both 8.9 scores use a local attack vector, though the Ash description speaks of an unauthenticated attacker. The Ash record says code execution was demonstrated with ecto 3.14.3 and db_connection 2.10.2.

CVE Component CVSS 4.0 Affected Fixed in
CVE-2026-129514hexpm server, hex.pm10.0Commits ab1bbce up to 379b0a2Commit 379b0a2
CVE-2026-133555db_connection8.91.1.0 before 2.10.32.10.3
CVE-2026-124283ash8.93.31.3 before 3.38.03.38.0
CVE-2026-130411flop9.20.8.0 before 0.26.7, 0.27.0 before 0.27.3, 0.28.0 before 0.28.1, 0.29.0 before 0.29.20.26.7, 0.27.3, 0.28.1, 0.29.2

What to do now

Hex.pm asks account holders to change their password. Reset 2FA at hex.pm/dashboard/security by choosing "Setup New App" under "Authenticator App" and verifying a code from the new entry. That issues a new secret and new recovery codes, which need storing. The route works where an organization requires 2FA and disabling it is refused.

Update the Hex client once the release with the new signing system is out. The command is mix local.hex --force, and rebar3 or Gleam need their own updates. Until that release, use only repo.hex.pm. Expect to log in again, since the key rotation logged everyone out of hex.pm and Hex clients.

Treat email that claims to come from Hex with suspicion. Addresses may have been exposed, so check that links lead to hex.pm and forward doubtful messages to security@hex.pm.

Teams that run their own hexpm instance should confirm the fix is in their tree. Run git merge-base --is-ancestor 379b0a29bcc95164249f38ad7d772a37a8ff9533 HEAD, or check that lib/hexpm_web/erlang_format.ex defines struct?/1. Our own advice, not the operator's, is to rotate every secret of an instance that ran a vulnerable commit on a public address.

The report publishes no indicators of compromise, neither addresses nor file names. The advisory's description suggests one server-side trace, a 500 with UndefinedFunctionError from Plug.MethodOverride on a POST with application/vnd.hex+erlang.

Elixir developers should upgrade db_connection to 2.10.3 and ash to 3.38.0. Flop is fixed in 0.26.7, 0.27.3, 0.28.1 and 0.29.2. Where an Ash upgrade must wait, 3.37.0 and later accept a long random keyset_signing_secret, which rejects unsigned cursors and invalidates old ones. Flop's workaround is pagination_types: [:page, :offset], which disables cursor pagination.

Four hardening changes are planned upstream, per the hex.pm report. The plug_crypto docs will call its decoder safe only for authenticated payloads, and an option to reject structs will follow. Plug will refuse struct values as body params, and ecto will check that binding is a list. The fourth is the db_connection fix above.

Sources are the hexpm advisory GHSA-9pmm-hf4r-27pg, the hex.pm incident report, EEF CNA records and OSV entry EEF-CVE-2026-129514.

Table of Contents
  1. Contents are built when the page loads

Have a story? Become a contributor.

We work with independent researchers and cybersecurity professionals. Send us a tip or submit your article for editorial review.

Questions on the topic

What is CVE-2026-129514 in hex.pm?
CVE-2026-129514 is a deserialization flaw in the hexpm server with a CVSS 4.0 score of 10.0. A forged Elixir struct in an Erlang-format request body let unauthenticated attackers run operating system commands.
Were hex.pm packages modified in the November 2026 attack?
Hex.pm says it found no evidence of modified packages or database changes after the November 23, 2026 attack. It cannot rule out that account data such as password hashes and 2FA secrets was read.
What should hex.pm users do after CVE-2026-129514?
Change your hex.pm password, reset 2FA and fetch packages only from repo.hex.pm. Update the Hex client with mix local.hex --force once the release with the new signing system ships.