CVE-2026-103503Hex trusts its bundled CA certificates when cacerts_path is set
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | erlang-hex | Fix pending | UBUNTU-CVE-2026-103503 | |
| Ubuntu 26.04 | erlang-hex | Under investigation | UBUNTU-CVE-2026-103503 | |
| Ubuntu 24.04 | erlang-hex | Under investigation | UBUNTU-CVE-2026-103503 | |
| Debian 14 | erlang-hex | Fixed | 2.5.3-2 | DEBIAN-CVE-2026-103503 |
| Debian 13 | erlang-hex | Fix pending | DEBIAN-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.
- hexpm hex: affected: 0.20.2 to before 2.5.2; fixed in
2.5.2 - hexpm hex: affected: c9b26a46928bfcd546773571e09c1d05f4cd9fb7 and later; fixed in
5f5a2136c7cf5991b6e8a30d645ca9f8e74b0785,6232a6498015e559743bec4f4fbec9138837cec8
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:
- https://github.com/hexpm/hex/security/advisories/GHSA-rw8q-hg7m-cxgr (vendor-advisory)
- https://github.com/hexpm/hex/commit/5f5a2136c7cf5991b6e8a30d645ca9f8e74b0785 (patch)
- https://github.com/hexpm/hex/commit/6232a6498015e559743bec4f4fbec9138837cec8 (patch)
References
- https://github.com/hexpm/hex/security/advisories/GHSA-rw8q-hg7m-cxgr
- https://cna.erlef.org/cves/CVE-2026-103503.html
- https://osv.dev/vulnerability/EEF-CVE-2026-103503
- https://github.com/hexpm/hex/commit/c9b26a46928bfcd546773571e09c1d05f4cd9fb7
- https://github.com/hexpm/hex/commit/5f5a2136c7cf5991b6e8a30d645ca9f8e74b0785
- https://github.com/hexpm/hex/commit/6232a6498015e559743bec4f4fbec9138837cec8
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.