Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain MITM position on victim HTTPS traffic
-
DeliveryObtain cert for Hex host from bundled-store CA
-
ExploitPresent chain leading to bundled CA
-
ExecutionBypass partial_chain despite custom cacerts_path
-
ImpactImpersonate Hex host and serve tampered packages
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V12 - Secure Communication Certificate validation
|
| Exploitation Conditions | Exploitation requires three concurrent conditions: (1) the attacker holds a man-in-the-middle position able to intercept the victim's HTTPS connection to a Hex host; (2) the attacker possesses a valid certificate for that Hex host issued by a CA that exists in Hex's bundled CA store; and (3) the victim has set cacerts_path (HEX_CACERTS_PATH) to a custom CA store that deliberately omits that bundled CA. The flaw is that Hex.HTTP.SSL.ssl_opts/1 builds the partial_chain callback from the bundled store regardless of cacerts_path, so a chain reaching any bundled CA is accepted even when the configured store excludes it. Limiting factors that reduce real-world risk: the custom cacerts_path setting is non-default and uncommon; a privileged network/MITM position is required; the attacker must obtain a certificate for the exact target host from an in-bundle CA; and hostname verification still applies, so the certificate must match the impersonated host's name. |
| Impact | This is a medium-severity (CVSS 4.0 base 5.9) improper certificate validation flaw (CWE-295) whose real-world risk is substantially constrained by its preconditions rather than its impact. The provided CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:A/VC:H/VI:L) encodes exactly why: although the attack is network-reachable and requires no privileges on the target, it carries High attack complexity, a Present attack requirement (AT:P), and active user interaction/condition (UI:A) - all signalling that exploitation is not opportunistic. The attacker must simultaneously (1) hold a man-in-the-middle position on the HTTPS connection, (2) possess a valid certificate for a Hex host issued by a CA that is in Hex's bundled store, and (3) rely on the victim having configured a custom cacerts_path/HEX_CACERTS_PATH store that omits that CA - a non-default, relatively uncommon hardening configuration. No EPSS score was supplied in the input, so exploitation probability cannot be quantified; there is no CISA KEV listing and no public exploit code referenced, so there is no evidence of active exploitation. No SSVC decision data was provided. The signals are internally consistent (no contradictions between vector and description), and collectively point to a targeted, narrow-impact issue rather than a widespread or urgent threat. The confidentiality impact is genuine (host impersonation on a trusted TLS channel), but the conjunction of MITM capability, a specifically-issued certificate, and a particular misconfiguration keeps real-world priority low-to-moderate; patch promptly where cacerts_path is used, but this is not a drop-everything issue. |
| Exploit ScenarioDerived | A user hardens Hex by setting HEX_CACERTS_PATH to a trimmed CA store intended to exclude a particular public CA, expecting Hex to reject hosts whose chains lead to that CA. An attacker positioned to intercept the victim's HTTPS traffic (e.g. on a compromised network or via upstream routing control) presents a certificate for the Hex host that chains to a CA still present in Hex's bundled store; because the partial_chain callback is always built from the bundled store, validation succeeds and the attacker impersonates the host to serve malicious or tampered package data. No public exploit code was identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 12, 2026
Improper certificate validation in Hex (the Elixir/Erlang package manager client, versions 0.20.2 through 2.5.1) allows a man-in-the-middle attacker to impersonate a Hex host under a narrow set of conditions: the attacker must intercept the victim's HTTPS traffic, must hold a certificate for the target host issued by a CA present in Hex's bundled CA store, and the victim must have pointed cacerts_path (HEX_CACERTS_PATH) at a custom store that deliberately excludes that CA. Under those preconditions the attacker can present a chain that reaches a bundled CA and have it accepted, defeating the operator's explicit trust configuration and potentially exposing package metadata, tarballs, and credentials transmitted to the impersonated host, although hostname verification still applies and reduces the attack surface. Assessed risk is medium (CVSS 4.0 base 5.9; CVSS 3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N) and is constrained by the non-default configuration requirement and the privileged network position needed; no public exploit code has been identified at time of analysis and the issue is not in CISA KEV. A vendor patch is available in Hex 2.5.2.
RemediationAI
Upgrade to Hex 2.5.2 or later, which is the vendor-released fix for this advisory; the corrective changes are visible in the upstream commits at https://github.com/hexpm/hex/commit/5f5a2136c7cf5991b6e8a30d645ca9f8e74b0785 and https://github.com/hexpm/hex/commit/6232a6498015e559743bec4f4fbec9138837cec8 (with the supporting runtime-store loading change at https://github.com/hexpm/hex/commit/c9b26a46928bfcd546773571e09c1d05f4cd9fb7), which make the chain-building logic use the same CA set as the cacerts option. If an immediate upgrade is not possible, the most effective compensating control is to unset cacerts_path / HEX_CACERTS_PATH so Hex falls back to its bundled CA store, which restores the previously mismatched trust set to a consistent one - the trade-off is that any custom or private CA the operator relied on for internal Hex mirrors will no longer be trusted, so internal endpoints must instead be reachable over a certificate chain that chains to a public bundled root, or the mirror must be accessed through a proxy whose TLS is terminated by an in-bundle authority. Alternatively, and where policy permits, ensure the custom store configured in cacerts_path is a strict superset of the bundled CA bundle so that the callback's effective trust set matches the configured trust set; this does not fix the underlying inconsistency, so it is a temporary measure only. Because exploitation requires an active man-in-the-middle position, tightening network paths - pinning or VPN-tunneling traffic to internal Hex mirrors, and monitoring for unexpected certificate issuance for Hex hostnames - reduces exposure. Reference the vendor advisory at https://github.com/hexpm/hex/security/advisories/GHSA-rw8q-hg7m-cxgr and the EEF disclosure at https://cna.erlef.org/cves/CVE-2026-103503.html for the full statement, and note that patch availability is confirmed by the vendor but no public exploit code has been identified at time of analysis.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is an instance of CWE-295 (Improper Certificate Validation) in Hex's HTTP TLS layer, written in Elixir on top of Erlang/OTP's :ssl application. Hex.HTTP.SSL.ssl_opts/1 assembles the SSL options passed to the Erlang TLS client, including the cacerts option (which lists the trusted root certificates) and a partial_chain callback. The cacerts_path configuration key (exposed via the HEX_CACERTS_PATH environment variable) is documented as the path to the CA certificate store to use in place of the CA bundle that ships with Hex, and the vulnerable code did correctly pass the custom path into the cacerts option. However, the partial_chain callback was unconditionally constructed from the bundled store rather than from the configured store: Hex.HTTP.SSL.partial_chain/2 accepts a server-supplied certificate chain whenever any certificate in that chain shares a public key with a certificate in the bundled CA set. As a result, a chain terminating in a bundled CA is accepted even when the operator's configured store omits that CA, silently widening the effective trust set back to the bundled roots. The upstream fix introduces Hex.HTTP.Certs.decode_runtime/1 to PEM-decode a runtime store from disk and a Hex.HTTP.SSL.get_ca_certs/0 helper that returns either the decoded runtime store (when cacerts_path is set) or the bundled certs, then wires that single value into both the cacerts option and the chain-building logic so the trust anchor set is consistent. Hostname verification is unaffected by the bug and remains in force, meaning an attacker's certificate must still match the impersonated host name. The CPE entries (cpe:2.3:a:hexpm:hex) confirm the affected package is the hexpm-published Hex client itself, not a dependent library.
Know when Hexpm gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
MITM position plus a non-default cacerts_path and an in-bundle-CA certificate drive AC:H and UI:R; no target auth gives PR:N; host impersonation yields C:H with limited I:L and no availability impact.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
DescriptionCVE.org
Improper Certificate Validation vulnerability in hexpm hex allows an attacker who can intercept HTTPS connections, and holds a certificate for a Hex host issued by a CA in Hex's bundled CA store, to impersonate that host to users who set cacerts_path to a CA store that leaves that CA out.
cacerts_path (HEX_CACERTS_PATH) is documented as the path to the CA certificate store, used instead of the CA bundle that ships with Hex. Hex.HTTP.SSL.ssl_opts/1 passes the configured store as the cacerts option, but builds the partial_chain callback from the bundled store whether cacerts_path is set or not. Hex.HTTP.SSL.partial_chain/2 accepts a server chain when any certificate in it has the same public key as a bundled CA certificate, so a chain that leads to a bundled CA passes verification although the configured store doesn't contain that CA. Hostname verification still applies.
This issue affects hex: from 0.20.2 before 2.5.2.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Insufficient session expiration in hexpm. Password reset tokens never expire, enabling persistent account takeover.
Silent dependency checksum bypass in hexpm/hex package manager (versions 0.16.0 through 2.4.1) allows attackers to subst
Improper input sanitization in hexpm's SharedAuthorizationView module allows unauthenticated attackers to inject malicio
Incorrect authorization in the hex.pm OAuth `client_credentials` endpoint allows any API key bearing the `repositories`
Path traversal in the Hex package manager for the Elixir/Erlang (Mix) ecosystem, versions 0.6.0 through 2.5.1, lets a ma
Hex, the package manager used by Elixir and Erlang projects, fails to properly scope its 'release-age cooldown' protecti
An uncontrolled resource consumption vulnerability in the Hex.pm package manager allows authenticated attackers to cause
Hexpm's OAuth implementation fails to enforce read-only API key restrictions during token exchange, allowing an attacker
Integrity-check bypass in the Hex package manager (hexpm hex) allows a compromised or attacker-controlled package mirror
Path traversal in hexpm's Local Storage backend allows unauthenticated attackers to read sensitive files through relativ
Improper TLS server-certificate validation in hex_core (0.1.0 through versions before 0.20.0) lets an attacker who alrea
Denial of service in Erlang OTP's stdlib erl_tar module (OTP 29.0 before 29.1.2, stdlib 8.0 before 8.1.1) allows an atta
EUVD-2026-97497
NVD
CVE.org
EPSS
GitHub
Exploit-DB