CVEfocus › CVE database › CVE-2026-103503

CVE-2026-103503Hex trusts its bundled CA certificates when cacerts_path is set

CVSS 5.9 MediumEPSS 0.3% (higher than 15% of CVEs)Published 2026-10-12Updated 2026-11-19Assigner: EEF

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.

CWE-295

What to do

Fixed builds are available from Debian: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
2Fix pending
2Under investigation

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10erlang-hexFix pendingUBUNTU-CVE-2026-103503
Ubuntu 26.04erlang-hexUnder investigationUBUNTU-CVE-2026-103503
Ubuntu 24.04erlang-hexUnder investigationUBUNTU-CVE-2026-103503
Debian 14erlang-hexFixed2.5.3-2DEBIAN-CVE-2026-103503
Debian 13erlang-hexFix pendingDEBIAN-CVE-2026-103503

What the vendor says

As published in the CVE record by EEF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: Upgrade Hex to 2.5.2 or later, for example with mix local.hex. With cacerts_path (HEX_CACERTS_PATH) set, Hex then only accepts server certificates that chain to a CA in that file, and it doesn't trust copies of CA certificates sent by the server.

Workaround: There's no Hex configuration that stops the bundled CAs from being trusted.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.