Summary
Uncontrolled Resource Consumption, Deserialization of Untrusted Data vulnerability in hexpm hexcore (hexapi modules), hexpm hex (mixhexapi modules), erlang rebar3 (r3hexapi modules) allows Object Injection, Excessive Allocation.
This vulnerability is associated with program files src/hexapi.erl, src/mixhexapi.erl, apps/rebar/src/vendored/r3hexapi.erl and program routines hexcore:request/4, mixhexapi:request/4, r3hexapi:request/4.
This issue affects rebar3: from 3.9.1 before 3.27.0; hex: from 2.3.0 before 2.3.2; hexcore: from 0.1.0 before 0.12.1.
Summary
Insufficient Verification of Data Authenticity vulnerability in hexpm hex (Hex.RemoteConverger module) allows dependency integrity bypass via unverified lockfile checksums.
Hex stores checksums for dependencies in the mix.lock file to ensure reproducible and integrity-checked builds. However, Hex.RemoteConverger.verifyresolved/2 never executes checksum verification because the lock data returned by Hex.Utils.lock/1 uses string-based dependency names, while the verification logic compares against atom-based names. This type mismatch causes the verification code path to be silently skipped. Checksums are still validated when packages are initially downloaded from the registry, but mismatches between the lockfile and resolved dependencies are not detected.
An attacker who can influence cached packages (e.g., via local cache poisoning or a compromised registry) can provide modified dependency contents that will be accepted without detection. The mix.lock file is silently rewritten with the checksum values from the registry, erasing evidence of tampering.
This issue affects hex: from 0.16.0 before 2.4.2.
Summary
Insufficient Verification of Data Authenticity vulnerability in hexpm hex (Hex.RemoteConverger module) allows dependency integrity bypass via unverified lockfile checksums.
Hex stores checksums for dependencies in the mix.lock file to ensure reproducible and integrity-checked builds. However, Hex.RemoteConverger.verifyresolved/2 never executes checksum verification because the lock data returned by Hex.Utils.lock/1 uses string-based dependency names, while the verification logic compares against atom-based names. This type mismatch causes the verification code path to be silently skipped. Checksums are still validated when packages are initially downloaded from the registry, but mismatches between the lockfile and resolved dependencies are not detected.
An attacker who can influence cached packages (e.g., via local cache poisoning or a compromised registry) can provide modified dependency contents that will be accepted without detection. The mix.lock file is silently rewritten with the checksum values from the registry, erasing evidence of tampering.
This issue affects hex: from 0.16.0 before 2.4.2.
Summary
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in hexpm hex allows a malicious package publisher to delete a directory outside the project's deps directory and extract package files into it when a developer fetches dependencies.
A package release's requirements carry an app label that names the dependency's OTP application. Hex takes this label from the repository's signed registry and uses it as the dependency's application name without validating it (Hex.RemoteConverger.deps/2, Hex.Mix.tolock/1). Mix derives the dependency's checkout directory as deps/<app>, and Hex.SCM.update/1 runs File.rmrf!/1 on that directory and unpacks the package into it. hex.pm only checks the label's length, so a publisher can set it to a value such as ../../target. When a project depends on such a release directly or transitively, mix deps.get or mix deps.update deletes the directory the label resolves to and writes the labelled package's files there. This happens before any dependency code is compiled.
This issue affects hex: from 0.6.0 before 2.5.2.
Details
1. hex.pm stores each requirement's app field with only a length check (255 codepoints) and copies it into the signed package registry resource when it differs from the dependency's package name. 2. Hex.RemoteConverger.deps/2 returns the dependency's children with String.toatom/1 of that label as the application name, and Hex.Mix.tolock/1 writes it as the mix.lock key. 3. Mix computes the dependency destination as Path.join(Mix.Project.depspath(), Atom.tostring(app)) without validating the name. 4. Hex.SCM.update/1 calls File.rmrf!(dest) and then Hex.Tar.unpack!(path, dest), so a label containing .. segments deletes and repopulates a directory outside deps. 5. Mix doesn't evaluate a Hex dependency's mix.exs during mix deps.get, so this is reachable before any package code runs.
Proof of concept
1. Publish package beta. 2. Publish package alpha with a requirement on beta whose app is ../../escapemarker. 3. In a project that depends on alpha, create ../escapemarker/canary.txt next to the project directory. 4. Run mix deps.get. Hex prints Updating ../../escapemarker (Hex package), deletes canary.txt and writes beta's files into ../escapemarker.
Impact
A publisher of any package in a project's dependency tree can make mix deps.get delete a directory that the developer's account can write and that .. segments relative to deps reach, such as the project directory or its parent, and fill it with the labelled package's files. Writing attacker-chosen files into a directory whose contents are later run or loaded can lead to code execution without the developer compiling the dependency. Developers who fetch dependencies to review them before compiling, CI jobs and dependency update bots that only run mix deps.get or mix deps.update are affected.
Workarounds
Before running mix deps.get on a mix.lock from an untrusted change, check that every key in mix.lock is a plain application name without /, \ or ... There's no workaround for new dependency resolution with mix deps.update or mix deps.get without a lock entry.
Configurations
Affects projects whose dependency tree, directly or transitively, contains a package release whose registry metadata carries a crafted dependency app label, when dependencies are fetched with mix deps.get or mix deps.update. Packages on hex.pm are affected while hex.pm accepts such labels; packages on self-hosted repositories are affected when the repository operator signs such metadata.
Solutions
Upgrade Hex to 2.5.2 or later, for example with mix local.hex. Hex then skips package releases that give a dependency an application name other than a letter followed by letters, digits, and -, and warns about them. Resolution fails if no other release of the package fits the requirements.
Summary
Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in hexpm hex allows an untrusted package mirror to exhaust the memory or disk space of the machine running mix deps.get, mix deps.update, mix hex.package fetch or mix hex.docs fetch.
Hex treats a mirror configured with HEXMIRRORURL, HEXMIRROR or mirrorurl as untrusted: it doesn't send credentials to it, and it checks registry signatures and package checksums that the mirror can't forge. Several response paths consume memory or disk in proportion to what the mirror sends before any of those checks run.
Hex.HTTP.request/5 reads the whole response body into memory and decompresses it with :zlib.gunzip/1 whenever the response's Content-Encoding contains gzip, with no limit on the compressed or decompressed size. Hex doesn't ask for compressed responses, so the server decides whether this step runs. It applies to registry, package, docs and API responses.
Package tarballs have no download size limit. Hex 2.5.1 holds the whole tarball in memory and writes it to the cache, and the development branch streams it to a temporary file; the 16 MiB tarball limit is checked only when the file is unpacked. The tarball is then unpacked, into deps/<app> in 2.5.1 and into a staging directory on the development branch, before its checksums are compared with the registry.
mix hex.docs fetch, and mix hex.docs offline when docs are missing, write the docs tarball to disk and extract it with :mixhexerltar.extract/2 without the 16 MiB compressed and 128 MiB decompressed limits that mixhextarball:unpackdocs/3 applies. The signed registry doesn't cover docs tarballs, so nothing checks them.
Registry responses are also decompressed before their signature is checked, in hexcore code that Hex vendors; that part is tracked in https://github.com/hexpm/hexcore/security/advisories/GHSA-7c4r-cgf9-9jmq.
This issue affects hex: from 0.11.2 before 2.5.2.
Details
1. Hex.HTTP.request/5 calls :httpc.request/5 with bodyformat: :binary, so the whole body is held in memory, and then calls :zlib.gunzip/1 when the content-encoding header contains gzip. Hex doesn't send Accept-Encoding. 2. When mirrorurl is set, Hex.Repo sends registry, tarball and docs requests to the mirror and marks it untrusted, so no credentials are sent to it. 3. Hex 2.5.1: Hex.SCM.fetch/3 writes the body returned by Hex.Repo.gettarball/3 to the cache. Hex.SCM.update/1 deletes deps/<app>, unpacks the tarball into it with Hex.Tar.unpack!/2 and compares the inner and outer checksums afterwards. Development branch: Hex.Repo.gettarballtofile/4 streams the tarball to a temporary file without counting bytes; the file is renamed into the cache and unpacked into a staging directory before the checksums are compared. 4. Mix.Tasks.Hex.Docs writes the body returned by Hex.Repo.getdocs/3 to disk and calls :mixhexerltar.extract/2 with [:compressed, cwd: ...] and no maxsize, while mixhextarball:unpackdocs/3 enforces a 16 MiB compressed and 128 MiB decompressed limit.
Proof of concept
1. Run a loopback HTTP server that answers with a 65,255-byte gzip stream decompressing to 64 MiB and Content-Encoding: gzip. Hex.HTTP.request(:get, url, %{}, nil) returns a 67,108,864-byte body; peak RSS was 220 MiB, against 91 MiB for an uncompressed control. 2. Serve a 17 MiB file as a package tarball. Hex.Repo.gettarball/3 returns all of it, and only the following unpack fails with {:tarball, :toobig}. 3. Serve a 131,574-byte docs tarball containing a 129 MiB file and set HEXMIRRORURL to the server. mix hex.docs fetch probe 1.0.0 writes the 129 MiB file and reports success.
Impact
A mirror operator, or an attacker who controls the mirror's responses, can make Hex allocate memory or write data far larger than what it sent: in tests against Hex main 851b938, a 65 KB gzip-encoded response decompressed to 64 MiB in memory, a 17 MiB tarball was downloaded in full despite the 16 MiB limit, and a 131 KB docs tarball wrote 129 MiB to disk. Larger responses stop the Erlang VM running Mix or fill the disk, failing builds and CI jobs, and a full disk affects other processes on the machine. No package code has to run, and the mirror doesn't need the repository's signing key.
Workarounds
Fetch from repo.hex.pm or a mirror you operate. Running Mix under operating system memory and disk limits, such as container limits, confines the effect to that container.
Configurations
Affects users who fetch packages or docs through a mirror set with HEXMIRRORURL, HEXMIRROR or mirrorurl. Fetches from repo.hex.pm over HTTPS aren't affected unless TLS verification is broken. A trusted mirror (HEXTRUSTEDMIRRORURL) or a self-hosted repository can do the same, but Hex already trusts those with credentials.
Solutions
Upgrade Hex to 2.5.2 or later, for example with mix local.hex. Hex then stops downloading a registry file, package, docs tarball or other file from a repository or mirror once it's larger than 16 MiB, including after decompressing a gzip-encoded response, and checks packages against the registry checksum before writing them to the package cache or unpacking a cached copy.
Summary
Protection Mechanism Failure vulnerability in hexpm hex allows the owner of a package, or an attacker who has taken over the owner's account, to get a newly published release past the release-age cooldown.
The cooldown (cooldown config, HEXCOOLDOWN) withholds versions younger than the configured age during dependency resolution. When the release of a package locked in mix.lock is retired or has a security advisory, Hex.RemoteConverger.buildcooldownbypass/3 and Hex.RemoteConverger.unsafelockbypass/1 lift the cooldown for every version of that package and of every package the locked release depends on, so that mix deps.update can move off the unsafe release. Retiring a release needs the same package owner permission as publishing one. An attacker who publishes a malicious release can retire the currently locked release, and the next mix deps.update that unlocks the package selects the new release regardless of its age. Hex.Registry.Cooldown.versions/2 checks the bypass by package name alone, so the bypass also covers packages with the same name in other repositories. Cooldown configured through an organization dependency policy is not affected.
This issue affects hex: from 2.5.0 before 2.5.2.
Details
1. Hex.RemoteConverger.buildcooldownbypass/3 adds unsafelockbypass(oldlock) to the set of packages exempt from the cooldown. 2. unsafelockbypass/1 adds a package's name, and the names of its locked children, whenever Registry.retired/3 or Registry.advisories/3 reports the locked version as unsafe. 3. Hex.Registry.Cooldown.versions/2 returns every version unfiltered for any package name in that set, so freshly published versions become eligible as soon as the package is unlocked. 4. hex.pm lets the package owner retire any of their releases, so the owner controls the trigger. Hex.Policy.Filter applies policy cooldowns without consulting the bypass set.
Proof of concept
1. Lock foo 1.0.0 in a project with HEXCOOLDOWN=7d. 2. Publish foo 1.0.1; mix deps.update foo reports it as filtered by cooldown and keeps 1.0.0. 3. Retire foo 1.0.0. 4. Run mix deps.update foo again; it upgrades to the 1-hour-old 1.0.1.
Impact
The cooldown exists to keep a compromised release out of projects until it can be detected and retired. An attacker who controls a package owner account can defeat it by also retiring the currently locked release, so a malicious release reaches projects that rely on the local cooldown as soon as they run mix deps.update, including automated dependency update jobs. The malicious release's code then runs when the dependency is compiled.
Workarounds
Enforce the cooldown through an organization dependency policy instead of the local cooldown setting, or run mix hex.audit before mix deps.update and don't update a package whose locked release was retired until its replacement has been reviewed.
Configurations
Affects projects that set the cooldown config or HEXCOOLDOWN and update dependencies with mix deps.update, or otherwise unlock the package during resolution. Cooldowns enforced through an organization dependency policy aren't affected.
Solutions
Upgrade Hex to 2.5.2 or later, for example with mix local.hex. A retired locked release then no longer lifts the release-age cooldown for its package. A locked release with a security advisory still lifts it for its package and the direct dependencies of the locked release, only in the repository the package is locked from.
Summary
Protection Mechanism Failure vulnerability in hexpm hex allows the owner of a package, or an attacker who has taken over the owner's account, to get a newly published release past the release-age cooldown.
The cooldown (cooldown config, HEXCOOLDOWN) withholds versions younger than the configured age during dependency resolution. When the release of a package locked in mix.lock is retired or has a security advisory, Hex.RemoteConverger.buildcooldownbypass/3 and Hex.RemoteConverger.unsafelockbypass/1 lift the cooldown for every version of that package and of every package the locked release depends on, so that mix deps.update can move off the unsafe release. Retiring a release needs the same package owner permission as publishing one. An attacker who publishes a malicious release can retire the currently locked release, and the next mix deps.update that unlocks the package selects the new release regardless of its age. Hex.Registry.Cooldown.versions/2 checks the bypass by package name alone, so the bypass also covers packages with the same name in other repositories. Cooldown configured through an organization dependency policy is not affected.
This issue affects hex: from 2.5.0 before 2.5.2.
Details
1. Hex.RemoteConverger.buildcooldownbypass/3 adds unsafelockbypass(oldlock) to the set of packages exempt from the cooldown. 2. unsafelockbypass/1 adds a package's name, and the names of its locked children, whenever Registry.retired/3 or Registry.advisories/3 reports the locked version as unsafe. 3. Hex.Registry.Cooldown.versions/2 returns every version unfiltered for any package name in that set, so freshly published versions become eligible as soon as the package is unlocked. 4. hex.pm lets the package owner retire any of their releases, so the owner controls the trigger. Hex.Policy.Filter applies policy cooldowns without consulting the bypass set.
Proof of concept
1. Lock foo 1.0.0 in a project with HEXCOOLDOWN=7d. 2. Publish foo 1.0.1; mix deps.update foo reports it as filtered by cooldown and keeps 1.0.0. 3. Retire foo 1.0.0. 4. Run mix deps.update foo again; it upgrades to the 1-hour-old 1.0.1.
Impact
The cooldown exists to keep a compromised release out of projects until it can be detected and retired. An attacker who controls a package owner account can defeat it by also retiring the currently locked release, so a malicious release reaches projects that rely on the local cooldown as soon as they run mix deps.update, including automated dependency update jobs. The malicious release's code then runs when the dependency is compiled.
Workarounds
Enforce the cooldown through an organization dependency policy instead of the local cooldown setting, or run mix hex.audit before mix deps.update and don't update a package whose locked release was retired until its replacement has been reviewed.
Configurations
Affects projects that set the cooldown config or HEXCOOLDOWN and update dependencies with mix deps.update, or otherwise unlock the package during resolution. Cooldowns enforced through an organization dependency policy aren't affected.
Solutions
Upgrade Hex to 2.5.2 or later, for example with mix local.hex. A retired locked release then no longer lifts the release-age cooldown for its package. A locked release with a security advisory still lifts it for its package and the direct dependencies of the locked release, only in the repository the package is locked from.
Summary
Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Erlang OTP stdlib (erltar module), hexpm hexcore (hexerltar module), hexpm hex (mixhexerltar module) and erlang rebar3 (r3hexerltar module) allows an attacker who supplies a tar archive to cause a denial of service via a crafted GNU sparse member.
When erltar:extract/1,2 writes a member to disk, erltar:streamtofileloop/3 reads it in chunks of 65536 bytes by default. For a GNU sparse member whose sparse map ends before its real size, erltar:dosparseread/3 matches its trailing-hole clause before its zero-length clause. After the chunk is used up, the trailing-hole clause reads zero bytes, does not advance the position, and recurses forever. A 2048-byte archive keeps the extracting process and one scheduler busy until the process is killed. The {maxsize, N} option prevents this only when N is below the real size of the member. Extraction with the memory option is not affected.
hexcore ships its own copy of erltar as hexerltar, and Hex and rebar3 ship hexcore with prefixed module names (mixhexerltar and r3hexerltar). These copies contain the same code and do not call stdlib's erltar, so they are affected on any OTP version. OTP 28 is not affected, but an application running on OTP 28 is affected if it extracts archives through an affected version of hexcore, Hex or rebar3.
This issue affects OTP from OTP 29.0 before OTP 29.1.2, corresponding to stdlib from 8.0 before 8.1.1, and rebar3 from 3.27.1 before 3.28.0, and hex from 2.4.2 before 2.5.3; hexcore: from 0.14.0 before 0.20.1.
Details
1. Chunked extraction. erltar:extract/2 writes each member to disk through streamtofileloop/3. This function calls doread(Reader, ChunkSize) until the numbytes field of the reader is 0. The default chunk size is 65536 bytes.
2. Clause order in dosparseread/3. For a sparse member, doread/2 calls dosparseread/3. The clause for a trailing hole matches when sparsemap is [] and Pos < Size. It comes before the clause that returns when Len is 0.
3. Unbounded recursion. The member is a GNU sparse member (typeflag S) whose real size is larger than one chunk and whose sparse map ends before the real size. After the data fragments, the trailing-hole clause reads the rest of the chunk and recurses with Len = 0. The same clause matches again, and readsparsehole/3 returns an empty binary and leaves Pos unchanged. The zero-length clause is never reached, so the call never returns.
4. No mitigation from maxsize. For a sparse member, {maxsize, N} is checked against the real size from the header. It stops the loop only when N is below that size. erltar:table/2 lists the member as regular, so a caller cannot skip sparse members by type.
Proof of concept
1. Build a 2048-byte tar that holds one GNU sparse member (typeflag S). Give it a stored size of 4 bytes, one sparse map entry of 4 bytes at offset 0, and a real size of 1048576 bytes. Follow the 512-byte header with a 512-byte block that starts with the 4 data bytes, then 1024 zero bytes. 2. In a separate process, call erltar:extract({binary, Tar}, [{cwd, Dir}]). 3. The call does not return. After 5 seconds the process has used more than 10^9 reductions. On OTP 28 the same call returns ok.
Impact
An attacker who can get an application to extract a tar archive to disk keeps the extracting process and one scheduler busy forever. Each further archive occupies another scheduler, until the node stops responding.
Workarounds
Pass {chunks, N} together with {maxsize, N}, with the same value N, to erltar:extract/2. Extraction then rejects any member larger than N, and reads each remaining member in one call, so the loop cannot occur.
Alternatively, extract with the memory option and write the returned files to disk in the application.
Hello Alan,
How am I, as a user, supposed to authenticate these PDFs as materials really produced by the parties Hex claims they are from? The PDFs are offered for download from the audited-party domain, not from the auditors' domains, and do not contain any digital signatures.
On Mon, Apr 13, 2026 at 4:16 AM Alan Coopersmith < alan.coopersmith () oracle com> wrote: https://hex.pm/blog/security-audit announces the completion of a security audit & penetration testing of Hex, the Erlang package manager, funded by the OpenSSF and overseen by the Erlang Ecosystem Foundation.
This work was done by two independent security firms, Paraxial.io and zentrust partners GmbH, who each produced their own reports: - https://hex.pm/reports/2026/paraxial.pdf - https://hex.pm/reports/2026/zentrust.pdf
The announcement reports: What was found --------------
Across both audits, a number of issues were identified, ranging from high severity vulnerabilities to low-severity hardening gaps.
Examples include:
Unsafe deserialization in hexcore that could lead to RCE under certain conditions A denial of service condition during package uploads Weaknesses in authentication flows and API key handling Gaps in CI/CD hardening (GitHub Actions) Missing or incomplete security controls in some areas
Importantly, the audits focused on realistic attack scenarios such as:
cross-account package tampering bypassing integrity checks injection in public-facing features CI/CD compromise
What we fixed -------------
Most findings have been remediated during the engagement and confirmed in re-tests.
Highlights:
Fixed unsafe deserialization in hexcore (CVE-2026-21619) Fixed API key privilege escalation (CVE-2026-21621) Fixed password reset issues (CVE-2026-21622) Fixed XSS in OAuth device flow (CVE-2026-21618) Fixed denial of service in package upload (CVE-2026-23940) Removed sensitive credentials from repositories Hardened authentication flows (including "sudo mode" for sensitive actions) Disabled legacy TLS versions Improved CSP and other browser security controls
Re-tests by both firms confirmed that the majority of vulnerabilities were successfully remediated.
Several remaining items are either:
accepted risks with clear rationale (for example UX trade-offs or staged migrations), or dependent on ecosystem-wide changes (for example client updates)
What we decided not to change (yet) -----------------------------------
Some findings reflect intentional trade-offs or transitional states rather than vulnerabilities.
Examples:
Basic authentication and optional 2FA are still supported for compatibility with existing clients. Both will be phased out once all clients support the OAuth2 device flow. Certain features (like documentation hosting) intentionally allow user-provided content and are being isolated rather than restricted.
These decisions were reviewed jointly by the Hex.pm team and the EEF. These issues appear to be reported against the hexpm server side, not the client side that end users & distros are likely to be running:
- Cross-site scripting (XSS) in OAuth Device Authorization screen (CVE-2026-21618) https://github.com/hexpm/hexpm/security/advisories/GHSA-6cw9-5gg4-rhpj
- Improper Scope Enforcement in OAuth clientcredentials Flow Allows Read-Only API Key to Escalate to Full Access with Valid 2FA Code (CVE-2026-21621) https://github.com/hexpm/hexpm/security/advisories/GHSA-739m-8727-j6w3
- Password Reset Tokens Do Not Expire (CVE-2026-21622) https://github.com/hexpm/hexpm/security/advisories/GHSA-6r94-pvwf-mxqm
- Path Traversal in Local File Store Backend (Development and Self-Hosted Registry Setups) (CVE-2026-23939) https://github.com/hexpm/hexpm/security/advisories/GHSA-42mv-r64p-4869
- Publishing Oversized Package Can Trigger Denial of Service (CVE-2026-23940) https://github.com/hexpm/hexpm/security/advisories/GHSA-jp8w-gxf6-8hcr
That leaves one CVE for distros and end users to worry about - https://github.com/hexpm/hexcore/security/advisories/GHSA-hx9w-f2w9-9g96 reports: Unsafe Deserialization of Erlang Terms in hexcore --------------------------------------------------
maennchen published GHSA-hx9w-f2w9-9g96 Feb 27, 2026
Package: hex (otp) Affected versions: >= 2.3.0 and <= 2.3.2 Patched versions: 2.3.2
Package: hexcore (Erlang) Affected versions: <= 0.12.1 Patched versions: 0.12.1
Package: rebar3 (otp) Affected versions: >= 3.9.1 and <= 3.27.0 Patched versions: 3.27.0
Impact ------ The Hex client (hexcore) deserializes Erlang terms received from the Hex API using binarytoterm/1 without sufficient restrictions.
If an attacker can control the HTTP response body returned by the Hex API, this allows denial-of-service attacks such as atom table exhaustion, leading to a VM crash. No released versions are known to allow remote code execution. Patches ------- https://github.com/hexpm/hexcore/commit/cdf726095bca85ad2549d146df1e831ae93c2b13
https://github.com/hexpm/hex/commit/636739f3322514e9303ca335fb630696fcbb3c95
https://github.com/erlang/rebar3/commit/1d4478f527e373de0b225951e53115450e0d9b9d Workarounds ----------- Ensure that the Hex API URL (HEXAPIURL) points only to trusted endpoints. There is no client-side workaround that fully mitigates this issue without applying the patch.
References ---------- - hexcore Module: https://github.com/hexpm/hexcore/blob/main/src/hexapi.erl - Hex Vendored Module: https://github.com/hexpm/hex/blob/main/src/mixhexapi.erl - Rebar3 Vendored Module: https://github.com/erlang/rebar3/blob/main/apps/rebar/src/vendored/r3hexapi.erl - hexcore Patch: cdf7260 - Hex Vendored Patch: hexpm/hex@636739f - Rebar3 Vendored Patch: erlang/rebar3@1d4478f
Severity: Low - 2.0 / 10 CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N CVE ID: CVE-2026-21619 Weaknesses: - CWE-400: Uncontrolled Resource Consumption - CWE-502: Deserialization of Untrusted Data
-- Alexander Patrakov
https://hex.pm/blog/security-audit announces the completion of a security audit & penetration testing of Hex, the Erlang package manager, funded by the OpenSSF and overseen by the Erlang Ecosystem Foundation.
This work was done by two independent security firms, Paraxial.io and zentrust partners GmbH, who each produced their own reports: - https://hex.pm/reports/2026/paraxial.pdf - https://hex.pm/reports/2026/zentrust.pdf
The announcement reports: What was found --------------
Across both audits, a number of issues were identified, ranging from high severity vulnerabilities to low-severity hardening gaps.
Examples include:
Unsafe deserialization in hexcore that could lead to RCE under certain conditions A denial of service condition during package uploads Weaknesses in authentication flows and API key handling Gaps in CI/CD hardening (GitHub Actions) Missing or incomplete security controls in some areas
Importantly, the audits focused on realistic attack scenarios such as:
cross-account package tampering bypassing integrity checks injection in public-facing features CI/CD compromise
What we fixed -------------
Most findings have been remediated during the engagement and confirmed in re-tests.
Highlights:
Fixed unsafe deserialization in hexcore (CVE-2026-21619) Fixed API key privilege escalation (CVE-2026-21621) Fixed password reset issues (CVE-2026-21622) Fixed XSS in OAuth device flow (CVE-2026-21618) Fixed denial of service in package upload (CVE-2026-23940) Removed sensitive credentials from repositories Hardened authentication flows (including "sudo mode" for sensitive actions) Disabled legacy TLS versions Improved CSP and other browser security controls
Re-tests by both firms confirmed that the majority of vulnerabilities were successfully remediated.
Several remaining items are either:
accepted risks with clear rationale (for example UX trade-offs or staged migrations), or dependent on ecosystem-wide changes (for example client updates)
What we decided not to change (yet) -----------------------------------
Some findings reflect intentional trade-offs or transitional states rather than vulnerabilities.
Examples:
Basic authentication and optional 2FA are still supported for compatibility with existing clients. Both will be phased out once all clients support the OAuth2 device flow. Certain features (like documentation hosting) intentionally allow user-provided content and are being isolated rather than restricted.
These decisions were reviewed jointly by the Hex.pm team and the EEF. These issues appear to be reported against the hexpm server side, not the client side that end users & distros are likely to be running:
- Cross-site scripting (XSS) in OAuth Device Authorization screen (CVE-2026-21618) https://github.com/hexpm/hexpm/security/advisories/GHSA-6cw9-5gg4-rhpj
- Improper Scope Enforcement in OAuth clientcredentials Flow Allows Read-Only API Key to Escalate to Full Access with Valid 2FA Code (CVE-2026-21621) https://github.com/hexpm/hexpm/security/advisories/GHSA-739m-8727-j6w3
- Password Reset Tokens Do Not Expire (CVE-2026-21622) https://github.com/hexpm/hexpm/security/advisories/GHSA-6r94-pvwf-mxqm
- Path Traversal in Local File Store Backend (Development and Self-Hosted Registry Setups) (CVE-2026-23939) https://github.com/hexpm/hexpm/security/advisories/GHSA-42mv-r64p-4869
- Publishing Oversized Package Can Trigger Denial of Service (CVE-2026-23940) https://github.com/hexpm/hexpm/security/advisories/GHSA-jp8w-gxf6-8hcr
That leaves one CVE for distros and end users to worry about - https://github.com/hexpm/hexcore/security/advisories/GHSA-hx9w-f2w9-9g96 reports: Unsafe Deserialization of Erlang Terms in hexcore --------------------------------------------------
maennchen published GHSA-hx9w-f2w9-9g96 Feb 27, 2026
Package: hex (otp) Affected versions: >= 2.3.0 and <= 2.3.2 Patched versions: 2.3.2
Package: hexcore (Erlang) Affected versions: <= 0.12.1 Patched versions: 0.12.1
Package: rebar3 (otp) Affected versions: >= 3.9.1 and <= 3.27.0 Patched versions: 3.27.0
Impact ------ The Hex client (hexcore) deserializes Erlang terms received from the Hex API using binarytoterm/1 without sufficient restrictions.
If an attacker can control the HTTP response body returned by the Hex API, this allows denial-of-service attacks such as atom table exhaustion, leading to a VM crash. No released versions are known to allow remote code execution.
Patches ------- https://github.com/hexpm/hexcore/commit/cdf726095bca85ad2549d146df1e831ae93c2b13 https://github.com/hexpm/hex/commit/636739f3322514e9303ca335fb630696fcbb3c95 https://github.com/erlang/rebar3/commit/1d4478f527e373de0b225951e53115450e0d9b9d
Workarounds ----------- Ensure that the Hex API URL (HEXAPIURL) points only to trusted endpoints. There is no client-side workaround that fully mitigates this issue without applying the patch.
References ---------- - hexcore Module: https://github.com/hexpm/hexcore/blob/main/src/hexapi.erl - Hex Vendored Module: https://github.com/hexpm/hex/blob/main/src/mixhexapi.erl - Rebar3 Vendored Module: https://github.com/erlang/rebar3/blob/main/apps/rebar/src/vendored/r3hexapi.erl - hexcore Patch: cdf7260 - Hex Vendored Patch: hexpm/hex@636739f - Rebar3 Vendored Patch: erlang/rebar3@1d4478f
Severity: Low - 2.0 / 10 CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N CVE ID: CVE-2026-21619 Weaknesses: - CWE-400: Uncontrolled Resource Consumption - CWE-502: Deserialization of Untrusted Data