TRENDING
Three Japanese emergency triage tags fanned out on a dark wooden table, with black, red, yellow and green priority bands along the bottom edge of the center tag
December 1, 2026
How to Triage Vulnerabilities in Python With CVSS, EPSS, and CISA KEV: Build a Decision Engine, Replay It on 71 Real KEV Additions, and See What Each Signal Missed
Three goats standing on top of a rusty steam locomotive boiler like winners on a podium, inside a roofed shed in Don Khon, Laos
December 1, 2026
The Register Gives China Mobile Credit for the “Most Capable” All-Domestic Open-Weight Model, but It Is China Telecom’s Xing4.1-Preview, Its Report Has No Capability Scores, the 4.68x Is a Simulation, and the Model Card’s Own Table Has It First or Tied for First on 2 of 18 Rows
A glass sugar dispenser with a steel lid beside a salt shaker and a pepper shaker with brass caps on a diner table
December 1, 2026
easyDNS Says Customer Records, Stored AWS Keys and Unsalted Mailbox Password Hashes Were Exposed, but the Public Notice Gives No Counts, the Entry Point Appears Only in the CEO’s Comments to a Reporter, and It Is the Second Security Incident Its Blog Has Posted This Year
Brass combination lock with three number wheels and a hinged latch on a black case
December 1, 2026
How to Lock Python Dependencies With Hashes So pip Refuses a Swapped File: Run a Tamper Test, Read pip’s Hash Errors, Build a Lock That Works on Windows and Linux, and Lint It in CI
A pair of unfinished pale wooden clogs, called sabots, on a clogmaker's workbench among wood shavings and hand tools.
December 1, 2026
Anthropic Denies Claude Is Trained to Sabotage Work, and Its Documents Fit the Denial but Show a Silent Safeguard Retired After About Two Days in June, a Training Cap on Kernel and LLM-Architecture Skills With No Released-Model Score, and Viral Evidence That Cannot Tell Them Apart
01 Dec 2026
SXZ.io SXZ.io
  • Home
Search the Site
Popular Searches:
Technology Amazon AI
Recent Posts
A bicycle chain with a missing link lying on an open palm beside the loose pin and clip that should have joined it
How to Fix SSL CERTIFICATE_VERIFY_FAILED in Python Without Turning Verification Off: Read the Error Code, Find Who Has to Fix It, Trust Your Own CA, and Catch Broken Chains in CI
November 30, 2026
Pale church wall with an arched window filled with a star-pattern stone lattice screen
The Unpublished Lattice Paper Attributed to Anthropic Reached the Public as Two Title Hashes That Match One Guessable String, the Coverage Splits on What It Breaks Because the Title Names Quantum Algorithms, Not a Key Recovery, and 21 of 24 Sites We Tested Still Pair ML-KEM With X25519
November 30, 2026
A tall cardon cactus with many upright arms stands in front of a field of cardon cacti under a blue sky with white clouds in the Sonoran Desert
Cacti’s 4HTTP2SHELL Chain Drew 1,793 Attack Attempts on One Honeypot Sensor in Four Days, but the Fix Is Still Only Source Patches With No 1.2.32 Release or CVE ID, the Advisory Calls It “Authenticated,” and on Our Reading of the Code the Guest Route Hinges on One Setting That Ships as “No User”
November 30, 2026
SXZ.io SXZ.io
  • Home

Categories

Articles 325 Posts
News 331 Posts
Learning Hub 297 Posts
Home/News/Hex Patched a Remote Code Execution Bug Present Since 2016 Within 15 Minutes, but a Second Fix Followed About 40 Minutes Later Without a Mention, the Registry Signing Key Was Left Out of the Credential Rotation, and the Client Release Meant to Replace It Is Not Out Six Days Later
News

Hex Patched a Remote Code Execution Bug Present Since 2016 Within 15 Minutes, but a Second Fix Followed About 40 Minutes Later Without a Mention, the Registry Signing Key Was Left Out of the Credential Rotation, and the Client Release Meant to Replace It Is Not Out Six Days Later

Hex’s incident post, four CVE records and the public repositories agree on the attack, but a second fix for uploaded package metadata is unmentioned and the client update that replaces the registry...

November 29, 2026 15 Min Read
20

On November 23, an unauthorized third party ran operating system commands on six hex.pm web servers by sending crafted request bodies. Hex, the package manager for Elixir and Erlang, says every server was running a fix 15 minutes after the first exploit request. Hex published its account on November 24, and the Erlang Ecosystem Foundation’s CVE team published CVE-2026-129514 the same day with a CVSS 4.0 score of 10.0. SecurityWeek covered it on November 27. We checked the post against the public records behind it: the fix commits, the CVE records for four libraries, the release lists on hex.pm and GitHub, and the documentation. The attack and the quick fix hold up. Three points sit outside the post or past its promises: a second fix for uploaded package metadata that landed about 40 minutes after the first, the registry signing key that was left out of the credential rotation, and the client release meant to replace that signing system, which was not out when we checked on November 29.

Table Of Content

  • What Hex says happened
  • How the bug worked, in outline
  • What the public record adds
  • The check was removed in February 2016
  • A second fix, about 40 minutes later, that the post does not mention
  • Four libraries, one of them missing from the post
  • What had not shipped when we checked
  • The signing key and the mirror advice
  • What to do
  • 1. Look for a mirror in your build
  • 2. Check mix.lock against the fixed versions
  • 3. Check what has shipped
  • Where the accounts differ and what is still open
  • Sources and method

What Hex says happened

Hex says the attacker exploited a vulnerability in hex.pm that let them run commands on its web servers, that it blocked the traffic and deployed a fix, and that it received a report of the same vulnerability shortly afterwards. The timeline below mixes the post’s own times with commit times we read from the GitHub API. Durations in the right-hand column are our arithmetic.

Nov 23 (UTC) Event Source
18:14:21 The attacker’s first request of any kind Hex post
18:16:00 First of 69 exploit requests; the error tracker logs its first error Hex post
18:26:41 Fix commit 379b0a2 authored, 10 min 41 s after the first exploit request GitHub API
18:27 Firewall rule added; fully in effect between 18:30 and 18:33 Hex post
18:29:33 Last exploit request to reach a server, 13 min 33 s after the first; a restart at 18:28 had started three new servers still on the vulnerable build Hex post
18:30 to 18:31 All servers replaced with a patched build, 15 min after the first exploit request Hex post
19:06:13 Second fix commit 2d0be98, titled “Refuse structs in release tarball metadata” GitHub API
19:07 An email arrives with a security report describing the same vulnerability Hex post
22:58, 23:05, 23:26 Reports to the Swedish data protection authority, CISA and ENISA Hex post
Nov 24, 13:48 CVE-2026-129514 published Hex post, GitHub advisory

Hex found no evidence of changed packages or database rows. All 23 releases published during the incident match an audit-log entry, all 62 package files written since 18:00 match the checksums in its database, all 186 registry files match the database contents, and a row-by-row comparison against a database copy restored from 18:13:59 found no unexplained change (a row changed and then changed back would not show up, as the post notes). It cannot rule out database reads, because reads are not logged, so it lists email addresses, password hashes, API key hashes, 2FA secrets, sessions and audit logs as possibly exposed. Reads of private packages in that period came from Hex’s own servers, but a read from a compromised server would look the same, so Hex cannot fully rule one out, and reads of private documentation are not logged. Hex says it will contact affected organizations directly.

How the bug worked, in outline

hex.pm accepted request bodies in Erlang’s external term format (content type application/vnd.hex+erlang) and decoded them before routing and authentication, so a POST to any route reached the decoder. The decoder used Plug.Crypto.non_executable_binary_to_term/2 with [:safe], which refuses functions and new atoms but not maps. An Elixir struct is a map with a __struct__ key, and Elixir dispatches protocols on that key, so the client could choose which code ran when error reporting inspected the request. The post and the CVE record walk through the chain, which passes through Ecto and DBConnection and ends in a call to a function named in the request. We leave out the chain’s details and any payload. The fix, commit 379b0a2, adds a recursive check to HexpmWeb.ErlangFormat.decode/1 that returns a 400 for any term containing a map with a __struct__ key.

What the public record adds

The check was removed in February 2016

The post says the safety check was removed on February 23, 2016, and the repository agrees. Commit ab1bbce, titled “Fix for some bad requests,” deleted a hand-written allowlist from the decoder and left only :erlang.binary_to_term(binary, [:safe]). The deleted code carried the comment “No atoms allowed!” and accepted numbers, binaries, booleans, lists, tuples and maps built from those, so a map with a __struct__ key would have been refused. From that commit to the attack is 3,925 days, ten years and nine months.

A second fix, about 40 minutes later, that the post does not mention

Commit 2d0be98 landed at 19:06:13 UTC, 39 minutes 32 seconds after the first fix. Its message reads: “metadata.config is parsed into Erlang terms, and a map with a __struct__ key built from existing atoms came through as a struct. Publishing then enumerates the requirements, which dispatches to that struct’s protocol implementations.” It adds a check to the release controller that refuses such metadata with a 422, and it moves the struct test into a shared helper that the request-body decoder now uses as well. Neither the post nor the CVE record mentions package metadata or tarballs, and the record’s affected range ends at 379b0a2. The path is reached by publishing a package, so it needs a Hex account (our reading). The post says every server ran the patched build by 18:31, which is true for the first fix. Public records do not say when the second fix was deployed.

Four libraries, one of them missing from the post

The post names Ash and db_connection. SecurityWeek writes that “Associated security defects were also patched in two other Elixir libraries,” db_connection and flop. The EEF CVE team published a fourth record, for flop, on the same day. The post never mentions flop, and the flop record does not mention hex.pm. Release times below come from the hex.pm API.

Package Record Score Affected Fixed release (UTC)
hex.pm service CVE-2026-129514 10.0 Critical 2016-02-23 to 2026-11-23 Commit 379b0a2, Nov 23 18:26
Ash CVE-2026-124283 8.9 High 3.31.3 to before 3.38.0 3.38.0, Nov 24 02:57 (3.38.1 at 13:08)
db_connection CVE-2026-133555 8.9 High 1.1.0 to before 2.10.3 2.10.3, Nov 24 14:08
flop CVE-2026-130411 9.2 Critical 0.8.0 to before 0.26.7, 0.27.0 to before 0.27.3, 0.28.0 to before 0.28.1, 0.29.0 to before 0.29.2 0.26.7, 0.27.3, 0.28.1 and 0.29.2, Nov 24 14:51 to 14:56

The db_connection record is candid about its own limits: “This issue is not exploitable in db_connection alone.” It adds that the root cause is a component that decodes untrusted input and “The :safe option does not reject structs.” Any application that decodes untrusted terms stays at risk whether or not it uses db_connection.

What had not shipped when we checked

The post lists hardening in plug_crypto, plug, ecto and db_connection, and says new Hex client releases will arrive “in the coming days.” On November 29, about 19:15 UTC, we checked each against the hex.pm API, the GitHub API and the builds server.

Item the post names State on Nov 29
plug_crypto: document that the decoder is only safe for authenticated payloads, add an option to reject structs The docs warning was added on Nov 24 at 09:47 UTC (commit 661a43f, titled “More disclaimers on non_executable_binary_to_term”) and shows on hexdocs. The three commits since Nov 20 touch only the docs text and the ExDoc lock file, and none adds an option to reject structs. Newest release is still 2.2.1 from Oct 23.
plug: refuse struct values as body params No commits to the default branch since Nov 23. Newest release is 1.20.4 from Nov 17.
ecto: check that the binding is a list before enumerating it in Inspect Commit b6812d4, Nov 23 at 19:22 UTC, adds the guard. Newest release is 3.14.3 from Nov 4, so no release has it.
db_connection: do not apply :log callbacks taken from stream structs Released as 2.10.3 on Nov 24 at 14:08 UTC.
New registry signing system and Hex client releases Newest Hex release is v2.7.0 from Nov 6, and builds.hex.pm lists 2.7.0 as the newest build. Four client pull requests merged between Nov 27 and Nov 29 concern credentials and the repository key, and none is titled for signing.

The plug_crypto docs now say “Use it alongside signing or encryption,” and that although the function rules out anonymous functions, “idioms such as {module, function, args} tuples may still be injected anywhere within the decoded data-structure (such as within structs) to invoke custom code.” The function’s own summary line still reads that it forbids executable terms, and that warning was added the morning after the attack.

The signing key and the mirror advice

Hex says that by 10:42 UTC on November 24 it had rotated every credential the attacker could have read, “except the registry signing key and a few low-impact secrets.” The CVE record, written by the same team, says the account running the web process “can read the environment of the application, which holds the database URL, the storage credentials and the registry signing key.” The post does not say whether the signing key was within the attacker’s reach, and it does not say the key was used. It says the new signing system “supports key rotation” and will come with new client releases, and in the meantime advises: do not trust third-party mirrors, fetch only from repo.hex.pm.

The post does not give its reason for the mirror advice. The Hex config documentation offers a clue: unless unsafe_registry is set, the client verifies the registry signature against the repository’s public key. On a mirror, that signature is the check that matters, and it rests on the key that has not been rotated. That is our reading. Nothing we found says the key was misused. Hex’s checks found no modified package or registry files, and storage writes came only from its own services.

What to do

Hex asks account holders to change their hex.pm password, reset 2FA from the security dashboard (choose “Setup New App” under “Authenticator App”), update the Hex client when the release with the new signing system is out, and use only repo.hex.pm until then. Hex does not think API keys need rotating: they are 128-bit random values stored as HMAC-SHA256. Passwords are hashed with bcrypt, which slows guessing but does not stop it for a weak password. Three more checks are ours.

1. Look for a mirror in your build

The config docs list mirror_url (environment variable HEX_MIRROR_URL), trusted_mirror_url (HEX_TRUSTED_MIRROR_URL) and unsafe_registry (HEX_UNSAFE_REGISTRY), and say mix hex.config lists keys and values. Run it in each CI job and developer shell, and print the environment variables too. We did not run Mix, because this machine has no Elixir installed. The commands come from the documentation.

mix hex.config
printenv | grep '^HEX_'

2. Check mix.lock against the fixed versions

The script below reads mix.lock and compares Ash, db_connection and flop with the affected ranges in the CNA records. It also lists the plug_crypto, plug and ecto versions you have, because their hardening had no release on November 29, and it prints every line of your own code that calls binary_to_term, which is where to ask whether the input is signed or encrypted. It only reads files, and it exits 1 when an affected version is locked. We tested it on made-up lock files, not on a real Mix project. Git and path dependencies are only reported, so check those refs by hand.

# hexlock_check.py
"""Read-only check of an Elixir project against the versions named in the November 24 2026 EEF CNA records
(Ash, db_connection, flop), plus a scan of the project's own code for binary_to_term calls.

Usage:  python hexlock_check.py PROJECT_DIR [--include-deps]
Exit:   0 no affected version, 1 at least one affected version, 2 usage error or unreadable mix.lock
"""
import re
import sys
from pathlib import Path

# package -> (first affected, first fixed, CVE), copied from the CNA records
RANGES = {
    "ash": [("3.31.3", "3.38.0", "CVE-2026-124283")],
    "db_connection": [("1.1.0", "2.10.3", "CVE-2026-133555")],
    "flop": [
        ("0.8.0", "0.26.7", "CVE-2026-130411"),
        ("0.27.0", "0.27.3", "CVE-2026-130411"),
        ("0.28.0", "0.28.1", "CVE-2026-130411"),
        ("0.29.0", "0.29.2", "CVE-2026-130411"),
    ],
}
NOTES = {"db_connection": "the record says it is not exploitable on its own, but upgrade anyway"}
# hardening the Hex post names but that had no fixed release when this was written
WATCH = ("plug_crypto", "plug", "ecto")

HEX_ENTRY = re.compile(r'"([A-Za-z0-9_]+)":\s*\{:hex,\s*:([A-Za-z0-9_]+),\s*"([^"]+)"')
GIT_ENTRY = re.compile(r'"([A-Za-z0-9_]+)":\s*\{:git,')
SKIP_DIRS = {"deps", "_build", ".git", "node_modules", ".elixir_ls"}
DECODER = re.compile(r"binary_to_term")


def vkey(version):
    """Sort key for 1.2.3, 1.2.3-rc.1 and 1.2.3+build: a pre-release sorts before its release."""
    core, _, pre = version.split("+")[0].partition("-")
    nums = tuple(int(part) for part in core.split("."))
    return nums, ((0, pre) if pre else (1, ""))


def affected(package, version):
    """Return (cve, first_fixed) when version is inside an affected range of package, else None."""
    for first_affected, first_fixed, cve in RANGES.get(package, []):
        if vkey(first_affected) <= vkey(version) < vkey(first_fixed):
            return cve, first_fixed
    return None


def read_lock(path):
    text = Path(path).read_text(encoding="utf-8")
    hex_deps = {m.group(2): m.group(3) for m in HEX_ENTRY.finditer(text)}  # Hex package name -> locked version
    git_deps = sorted(set(GIT_ENTRY.findall(text)))
    return hex_deps, git_deps


def scan_source(root, include_deps=False):
    root = Path(root)
    skip = SKIP_DIRS - ({"deps"} if include_deps else set())
    hits = []
    for path in sorted(root.rglob("*")):
        if path.suffix not in (".ex", ".exs") or not path.is_file():
            continue
        if set(path.relative_to(root).parts) & skip:
            continue
        for number, line in enumerate(path.read_text(encoding="utf-8", errors="replace").splitlines(), 1):
            if DECODER.search(line):
                hits.append((path.relative_to(root).as_posix(), number, line.strip()))
    return hits


def main(argv):
    args = [a for a in argv[1:] if not a.startswith("--")]
    if len(args) != 1:
        print(__doc__)
        return 2
    root = Path(args[0])
    lock = root / "mix.lock"
    try:
        hex_deps, git_deps = read_lock(lock)
    except OSError as exc:
        print("cannot read", lock, "-", exc)
        return 2
    bad = 0
    print(f"{lock.name}: {len(hex_deps)} Hex packages, {len(git_deps)} git packages")
    for package in sorted(hex_deps):
        version = hex_deps[package]
        if package in RANGES:
            try:
                hit = affected(package, version)
            except ValueError:
                print(f"UNPARSED  {package} {version}: check by hand")
                continue
            if hit:
                bad += 1
                note = f"; {NOTES[package]}" if package in NOTES else ""
                print(f"AFFECTED  {package} {version} ({hit[0]}, first fixed release {hit[1]}{note})")
            else:
                print(f"ok        {package} {version}")
        elif package in WATCH:
            print(f"watch     {package} {version} (hardening named in the Hex post, see the status table)")
    for package in git_deps:
        if package in RANGES or package in WATCH:
            print(f"git       {package}: pinned to a git ref, check the ref by hand")
    hits = scan_source(root, "--include-deps" in argv)
    print(f"binary_to_term in project code: {len(hits)} line(s)")
    for rel, number, text in hits:
        print(f"  {rel}:{number}: {text}")
    return 1 if bad else 0


if __name__ == "__main__":
    sys.exit(main(sys.argv))

Create a made-up project with an old lock file and one decoder call in the shape the records describe:

# shop/mix.lock (made up for this check, not a real project)
%{
  "ash": {:hex, :ash, "3.37.7", "0000", [:mix], [], "hexpm", "0000"},
  "db_connection": {:hex, :db_connection, "2.10.2", "0000", [:mix], [], "hexpm", "0000"},
  "ecto": {:hex, :ecto, "3.14.3", "0000", [:mix], [], "hexpm", "0000"},
  "flop": {:hex, :flop, "0.29.1", "0000", [:mix], [], "hexpm", "0000"},
  "jason": {:hex, :jason, "1.4.4", "0000", [:mix], [], "hexpm", "0000"},
  "plug": {:hex, :plug, "1.20.4", "0000", [:mix], [], "hexpm", "0000"},
  "plug_crypto": {:hex, :plug_crypto, "2.2.1", "0000", [:mix], [], "hexpm", "0000"},
}
# shop/lib/shop_web/cursor.ex (made up: the shape of code the records describe)
defmodule ShopWeb.Cursor do
  def decode(param) do
    param |> Base.url_decode64!() |> :erlang.binary_to_term([:safe])
  end
end
python3 hexlock_check.py shop; echo "exit code $?"
mix.lock: 7 Hex packages, 0 git packages
AFFECTED  ash 3.37.7 (CVE-2026-124283, first fixed release 3.38.0)
AFFECTED  db_connection 2.10.2 (CVE-2026-133555, first fixed release 2.10.3; the record says it is not exploitable on its own, but upgrade anyway)
watch     ecto 3.14.3 (hardening named in the Hex post, see the status table)
AFFECTED  flop 0.29.1 (CVE-2026-130411, first fixed release 0.29.2)
watch     plug 1.20.4 (hardening named in the Hex post, see the status table)
watch     plug_crypto 2.2.1 (hardening named in the Hex post, see the status table)
binary_to_term in project code: 1 line(s)
  lib/shop_web/cursor.ex:4: param |> Base.url_decode64!() |> :erlang.binary_to_term([:safe])
exit code 1

Three versions are affected, and the decoder line is flagged for a human to judge. Now replace the lock file with the versions that mix deps.update ash db_connection flop would give you:

# shop/mix.lock (after mix deps.update ash db_connection flop)
%{
  "ash": {:hex, :ash, "3.38.1", "0000", [:mix], [], "hexpm", "0000"},
  "db_connection": {:hex, :db_connection, "2.10.3", "0000", [:mix], [], "hexpm", "0000"},
  "ecto": {:hex, :ecto, "3.14.3", "0000", [:mix], [], "hexpm", "0000"},
  "flop": {:hex, :flop, "0.29.2", "0000", [:mix], [], "hexpm", "0000"},
  "jason": {:hex, :jason, "1.4.4", "0000", [:mix], [], "hexpm", "0000"},
  "plug": {:hex, :plug, "1.20.4", "0000", [:mix], [], "hexpm", "0000"},
  "plug_crypto": {:hex, :plug_crypto, "2.2.1", "0000", [:mix], [], "hexpm", "0000"},
}
python3 hexlock_check.py shop; echo "exit code $?"
mix.lock: 7 Hex packages, 0 git packages
ok        ash 3.38.1
ok        db_connection 2.10.3
watch     ecto 3.14.3 (hardening named in the Hex post, see the status table)
ok        flop 0.29.2
watch     plug 1.20.4 (hardening named in the Hex post, see the status table)
watch     plug_crypto 2.2.1 (hardening named in the Hex post, see the status table)
binary_to_term in project code: 1 line(s)
  lib/shop_web/cursor.ex:4: param |> Base.url_decode64!() |> :erlang.binary_to_term([:safe])
exit code 0

The three affected lines become ok and the exit code is 0. The decoder line stays, because an upgrade does not change your code. The Ash record adds a note for anyone using keyset pagination: when keyset_signing_secret is unset, Ash does not authenticate the cursor.

The tests below cover version ordering, every range boundary in the records, lock parsing, the source scan and the exit codes:

# test_hexlock.py
import subprocess
import sys
from pathlib import Path

import pytest

import hexlock_check as h

LOCK = """%{
  "ash": {:hex, :ash, "3.37.7", "aa", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "bb"},
  "db_connection": {:hex, :db_connection, "2.10.3", "cc", [:mix], [], "hexpm", "dd"},
  "ecto": {:hex, :ecto, "3.14.3", "ee", [:mix], [], "hexpm", "ff"},
  "phx_gettext": {:hex, :gettext, "0.26.2", "gg", [:mix], [], "hexpm", "hh"},
  "flop": {:git, "https://github.com/example/flop.git", "abc123", []},
}
"""


def test_version_order_is_numeric_and_prerelease_first():
    assert h.vkey("2.10.3") > h.vkey("2.9.0")
    assert h.vkey("3.38.0-rc.1") < h.vkey("3.38.0")
    assert h.vkey("3.38.0+build.5") == h.vkey("3.38.0")


@pytest.mark.parametrize("package,version,expected", [
    ("ash", "3.31.2", False), ("ash", "3.31.3", True), ("ash", "3.37.7", True),
    ("ash", "3.38.0-rc.1", True), ("ash", "3.38.0", False), ("ash", "3.38.1", False),
    ("db_connection", "1.0.9", False), ("db_connection", "1.1.0", True), ("db_connection", "2.9.0", True),
    ("db_connection", "2.10.2", True), ("db_connection", "2.10.3", False),
    ("flop", "0.8.0", True), ("flop", "0.26.6", True), ("flop", "0.26.7", False),
    ("flop", "0.27.0", True), ("flop", "0.27.2", True), ("flop", "0.27.3", False),
    ("flop", "0.28.0", True), ("flop", "0.28.1", False), ("flop", "0.29.1", True),
    ("flop", "0.29.2", False), ("flop", "0.30.0", False),
    ("jason", "1.0.0", False),
])
def test_ranges(package, version, expected):
    assert bool(h.affected(package, version)) is expected


def test_read_lock_uses_the_hex_package_name_and_lists_git_deps(tmp_path):
    lock = tmp_path / "mix.lock"
    lock.write_text(LOCK, encoding="utf-8")
    hex_deps, git_deps = h.read_lock(lock)
    assert hex_deps == {"ash": "3.37.7", "db_connection": "2.10.3", "ecto": "3.14.3", "gettext": "0.26.2"}
    assert git_deps == ["flop"]


def test_scan_skips_deps_and_build_unless_asked(tmp_path):
    for rel in ("lib/a.ex", "deps/x/lib/b.ex", "_build/dev/c.ex", "test/d_test.exs"):
        p = tmp_path / rel
        p.parent.mkdir(parents=True, exist_ok=True)
        p.write_text("x = :erlang.binary_to_term(bin, [:safe])\n", encoding="utf-8")
    assert [r for r, _, _ in h.scan_source(tmp_path)] == ["lib/a.ex", "test/d_test.exs"]
    assert [r for r, _, _ in h.scan_source(tmp_path, include_deps=True)] == ["deps/x/lib/b.ex", "lib/a.ex", "test/d_test.exs"]


def run_cli(*args):
    return subprocess.run([sys.executable, str(Path(h.__file__)), *args], capture_output=True, text=True, encoding="utf-8")


def test_cli_exit_codes_and_lines(tmp_path):
    bad = tmp_path / "bad"
    good = tmp_path / "good"
    for folder, ash in ((bad, "3.37.7"), (good, "3.38.1")):
        folder.mkdir()
        (folder / "mix.lock").write_text(
            '%{\n  "ash": {:hex, :ash, "VERSION", "aa", [:mix], [], "hexpm", "bb"},\n}\n'.replace("VERSION", ash),
            encoding="utf-8")
    r = run_cli(str(bad))
    assert r.returncode == 1 and "AFFECTED  ash 3.37.7 (CVE-2026-124283, first fixed release 3.38.0)" in r.stdout
    r = run_cli(str(good))
    assert r.returncode == 0 and "ok        ash 3.38.1" in r.stdout
    assert run_cli(str(tmp_path / "missing")).returncode == 2
    assert run_cli().returncode == 2


def test_cli_reports_git_pin_and_decoder_line(tmp_path):
    (tmp_path / "mix.lock").write_text(LOCK, encoding="utf-8")
    (tmp_path / "lib").mkdir()
    (tmp_path / "lib" / "c.ex").write_text("  def decode(p), do: :erlang.binary_to_term(p, [:safe])\n", encoding="utf-8")
    r = run_cli(str(tmp_path))
    assert "git       flop: pinned to a git ref" in r.stdout
    assert "lib/c.ex:1: def decode(p), do: :erlang.binary_to_term(p, [:safe])" in r.stdout
    assert r.returncode == 1  # the LOCK sample pins ash 3.37.7, which is affected
............................ [100%]
28 passed in 0.32s

3. Check what has shipped

This read-only script prints the newest release of each package the post names and the newest Hex client. Run it before you decide the hardening is out. Our run on November 29 printed:

# hex_state.py
"""Print the newest release of the packages named in the Hex incident post, and the newest Hex client.
Read-only, public endpoints only: hex.pm/api, api.github.com and builds.hex.pm."""
import json
import urllib.request

HEADERS = {"User-Agent": "hex-state-check/1.0", "Accept": "application/json"}


def get(url):
    with urllib.request.urlopen(urllib.request.Request(url, headers=HEADERS), timeout=30) as response:
        return response.read().decode("utf-8")


for name in ("plug_crypto", "plug", "ecto", "db_connection", "ash", "flop"):
    package = json.loads(get(f"https://hex.pm/api/packages/{name}"))
    newest = max(package["releases"], key=lambda r: r["inserted_at"])
    print(f"{name:<14} newest release {newest['version']:<8} inserted {newest['inserted_at'][:16]} UTC")

release = json.loads(get("https://api.github.com/repos/hexpm/hex/releases?per_page=1"))[0]
print(f"hexpm/hex      newest release {release['tag_name']:<8} published {release['published_at'][:16]} UTC")
builds = get("https://builds.hex.pm/installs/hex-1.x.csv").strip().splitlines()
print("builds.hex.pm  newest Hex build", builds[-1].split(",")[0])
plug_crypto    newest release 2.2.1    inserted 2026-10-23T09:48 UTC
plug           newest release 1.20.4   inserted 2026-11-17T16:35 UTC
ecto           newest release 3.14.3   inserted 2026-11-04T08:43 UTC
db_connection  newest release 2.10.3   inserted 2026-11-24T14:08 UTC
ash            newest release 3.38.1   inserted 2026-11-24T13:08 UTC
flop           newest release 0.26.7   inserted 2026-11-24T14:56 UTC
hexpm/hex      newest release v2.7.0   published 2026-11-06T13:54 UTC
builds.hex.pm  newest Hex build 2.7.0

Where the accounts differ and what is still open

  • Libraries. The post names three affected projects, hexpm, Ash and db_connection. SecurityWeek and the EEF CVE index add flop.
  • Fix timing. The post says every server ran the patched build by 18:31. A second fix for uploaded package metadata reached the repository at 19:06, and its deployment time is not public.
  • Signing key. The post leaves it out of the rotation, the CVE record lists it among the values in the process environment, and no client release with key rotation was out on November 29.
  • Severity. The 10.0 score comes from the CVE team (CVSS 4.0, with the exploit-maturity metric set to Attacked). NVD showed the record as Awaiting Analysis, and CISA’s catalog 2026.11.27 did not list any of the four CVEs.
  • How the attacker found it. The post says request logs since November 19 show repeated downloads of hex.pm’s own dependencies, which suggests a local copy built for testing. It does not say how the flaw was found. The report that arrived at 19:07 came after the attack began.
  • Updates. The post says “We’ll update this post as our investigation continues.” The file’s history shows three commits, all on November 24, and comparing the Wayback capture of 14:50 UTC that day with the live page shows one change, a link to the db_connection CVE.

Other recent reports in the same vein: the WP connect plugin backdoor on the WordPress.org plugin repository, the poisoned Microsoft agent-framework releases on PyPI, and the Idunno.AntiCsrf deserialization flaw, another CWE-502 bug with no patch. For the Python side of safe parsing, see our PyYAML tutorial.

Sources and method

Primary records: the Hex incident post of November 24, the GitHub advisory, and the EEF CNA records for CVE-2026-129514, CVE-2026-124283, CVE-2026-133555 and CVE-2026-130411. Code history: hexpm commits 379b0a2, 2d0be98 and ab1bbce, plug_crypto commit 661a43f, and ecto commit b6812d4, all read through the GitHub API. Documentation: Plug.Crypto and mix hex.config. Release data: the hex.pm package API, the Hex client releases and builds.hex.pm. Other: NVD, the CISA catalog and SecurityWeek.

Checks ran on November 29 between 19:00 and 19:30 UTC with a generic client name and public endpoints only. We made only ordinary read requests to public pages and APIs. No exploit was built or run, and nothing was sent to the attacker addresses, which the post does not publish. We did not run Elixir, Mix or the hex.pm code. The attack timeline, the 69 requests and the no-changes findings are Hex’s statements, which we could not check independently. Durations and the 3,925-day figure are our arithmetic from the timestamps shown.

Tags:

CVE-2026-129514ElixirErlangHexInsecure DeserializationRemote Code ExecutionSupply Chain Attack

Share

A torn blue security seal stuck across a join, cut off after the letters SECURI, a broken tamper-evident label
Previous Post

How to Verify a Download Before You Run It: Check SHA-256, GPG, Sigstore, GitHub Attestations, and Windows Authenticode on Real Files, and See Which Attack Each Check Stops

A pair of unfinished pale wooden clogs, called sabots, on a clogmaker's workbench among wood shavings and hand tools.
Next Post

Anthropic Denies Claude Is Trained to Sabotage Work, and Its Documents Fit the Denial but Show a Silent Safeguard Retired After About Two Days in June, a Training Cap on Kernel and LLM-Architecture Skills With No Released-Model Score, and Viral Evidence That Cannot Tell Them Apart

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest
30 Nov
How to Fix SSL CERTIFICATE_VERIFY_FAILED in Python Without Turning Verification Off: Read the Error Code, Find Who Has to Fix It, Trust Your Own CA, and Catch Broken Chains in CI
30 Nov
The Unpublished Lattice Paper Attributed to Anthropic Reached the Public as Two Title Hashes That Match One Guessable String, the Coverage Splits on What It Breaks Because the Title Names Quantum Algorithms, Not a Key Recovery, and 21 of 24 Sites We Tested Still Pair ML-KEM With X25519
Trending
November 30, 2026
How to Fix SSL CERTIFICATE_VERIFY_FAILED in Python Without Turning Verification Off: Read the Error Code, Find Who Has to Fix It, Trust Your Own CA, and Catch Broken Chains in CI
November 30, 2026
The Unpublished Lattice Paper Attributed to Anthropic Reached the Public as Two Title Hashes That Match One Guessable String, the Coverage Splits on What It Breaks Because the Title Names Quantum Algorithms, Not a Key Recovery, and 21 of 24 Sites We Tested Still Pair ML-KEM With X25519
November 30, 2026
Cacti’s 4HTTP2SHELL Chain Drew 1,793 Attack Attempts on One Honeypot Sensor in Four Days, but the Fix Is Still Only Source Patches With No 1.2.32 Release or CVE ID, the Advisory Calls It “Authenticated,” and on Our Reading of the Code the Guest Route Hinges on One Setting That Ships as “No User”
November 30, 2026
How to Triage Vulnerabilities in Python With CVSS, EPSS, and CISA KEV: Build a Decision Engine, Replay It on 71 Real KEV Additions, and See What Each Signal Missed
November 30, 2026
The Register Gives China Mobile Credit for the “Most Capable” All-Domestic Open-Weight Model, but It Is China Telecom’s Xing4.1-Preview, Its Report Has No Capability Scores, the 4.68x Is a Simulation, and the Model Card’s Own Table Has It First or Tied for First on 2 of 18 Rows
November 30, 2026
easyDNS Says Customer Records, Stored AWS Keys and Unsalted Mailbox Password Hashes Were Exposed, but the Public Notice Gives No Counts, the Entry Point Appears Only in the CEO’s Comments to a Reporter, and It Is the Second Security Incident Its Blog Has Posted This Year

Related Posts

Rows of server racks in a data center representing network infrastructure targeted by botnets
News

C0XMO Botnet Shows Why Old Router Firmware Still Matters

June 7, 2026
Close-up of a USB flash drive, representing physical data-theft risk in office security incidents
News

Fake IT Support Is Now Walking Through the Front Door

June 7, 2026
A phone security app on a smartphone resting on a laptop keyboard.
News

Everest Forms Pro Flaw Is Being Exploited to Create Rogue WordPress Admins

June 7, 2026
A phone secured by a padlock, illustrating AI data-leak containment and security controls.
News

OpenAI’s Lockdown Mode Is a Data-Leak Brake, Not a Prompt-Injection Cure

June 8, 2026
SXZ.io SXZ.io
  • [email protected]

Categories

Articles
Learning Hub
News

All Rights Reserved by SXZ.io ©2026