{"containers":{"cna":{"affected":[{"cpes":["cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.Hex.HTTP.SSL'"],"packageName":"hex","packageURL":"pkg:otp/hex?repository_url=https:%2F%2Fgithub.com%2Fhexpm%2Fhex&vcs_url=repository_url=git%2Bhttps:%2F%2Fgithub.com%2Fhexpm%2Fhex.git","product":"hex","programFiles":["lib/hex/http/ssl.ex"],"programRoutines":[{"name":"'Elixir.Hex.HTTP.SSL':ssl_opts/1"},{"name":"'Elixir.Hex.HTTP.SSL':partial_chain/2"}],"repo":"https://github.com/hexpm/hex","vendor":"hexpm","versions":[{"lessThan":"2.5.2","status":"affected","version":"0.20.2","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.Hex.HTTP.SSL'"],"packageName":"hexpm/hex","packageURL":"pkg:github/hexpm/hex","product":"hex","programFiles":["lib/hex/http/ssl.ex"],"programRoutines":[{"name":"'Elixir.Hex.HTTP.SSL':ssl_opts/1"},{"name":"'Elixir.Hex.HTTP.SSL':partial_chain/2"}],"repo":"https://github.com/hexpm/hex","vendor":"hexpm","versions":[{"changes":[{"at":"5f5a2136c7cf5991b6e8a30d645ca9f8e74b0785","status":"unaffected"},{"at":"6232a6498015e559743bec4f4fbec9138837cec8","status":"unaffected"}],"lessThan":"*","status":"affected","version":"c9b26a46928bfcd546773571e09c1d05f4cd9fb7","versionType":"git"}]}],"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Affects users who set <code>cacerts_path</code> or <code>HEX_CACERTS_PATH</code> to a CA store that leaves out some of the CAs bundled with Hex. Users who don't set it trust the bundled store already and aren't affected.</p>"},{"base64":false,"type":"text/markdown","value":"Affects users who set `cacerts_path` or `HEX_CACERTS_PATH` to a CA store that leaves out some of the CAs bundled with Hex. Users who don't set it trust the bundled store already and aren't affected."}],"value":"Affects users who set cacerts_path or HEX_CACERTS_PATH to a CA store that leaves out some of the CAs bundled with Hex. Users who don't set it trust the bundled store already and aren't affected."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*","versionEndExcluding":"2.5.2","versionStartIncluding":"0.20.2","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Eric Meadows-Jönsson"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"}],"dateAssigned":"2026-10-10T12:59:48.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>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 <code>cacerts_path</code> to a CA store that leaves that CA out.</p>\n<p><code>cacerts_path</code> (<code>HEX_CACERTS_PATH</code>) is documented as the path to the CA certificate store, used instead of the CA bundle that ships with Hex. <code>Hex.HTTP.SSL.ssl_opts/1</code> passes the configured store as the <code>cacerts</code> option, but builds the <code>partial_chain</code> callback from the bundled store whether <code>cacerts_path</code> is set or not. <code>Hex.HTTP.SSL.partial_chain/2</code> 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.</p>\n<p>This issue affects hex: from 0.20.2 before 2.5.2.</p>"},{"base64":false,"type":"text/markdown","value":"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.\n\n`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.\n\nThis issue affects hex: from 0.20.2 before 2.5.2."}],"value":"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.\n\ncacerts_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.\n\nThis issue affects hex: from 0.20.2 before 2.5.2."}],"impacts":[{"capecId":"CAPEC-94","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Users set <code>cacerts_path</code> to limit which CAs can authenticate Hex's servers, for example to their organization's internal CA. Every CA in Hex's bundled store can still authenticate those servers, so a certificate mis-issued by one of those CAs, or obtained through compromised domain validation, lets an attacker on the network path impersonate hex.pm, repo.hex.pm, a self-hosted repository or a mirror. The attacker receives the API keys, OAuth tokens and repository keys Hex sends, and can alter API responses. Registry signatures and package checksums still prevent changes to registry contents and packages.</p>"},{"base64":false,"type":"text/markdown","value":"Users set `cacerts_path` to limit which CAs can authenticate Hex's servers, for example to their organization's internal CA. Every CA in Hex's bundled store can still authenticate those servers, so a certificate mis-issued by one of those CAs, or obtained through compromised domain validation, lets an attacker on the network path impersonate hex.pm, repo.hex.pm, a self-hosted repository or a mirror. The attacker receives the API keys, OAuth tokens and repository keys Hex sends, and can alter API responses. Registry signatures and package checksums still prevent changes to registry contents and packages."}],"value":"Users set cacerts_path to limit which CAs can authenticate Hex's servers, for example to their organization's internal CA. Every CA in Hex's bundled store can still authenticate those servers, so a certificate mis-issued by one of those CAs, or obtained through compromised domain validation, lets an attacker on the network path impersonate hex.pm, repo.hex.pm, a self-hosted repository or a mirror. The attacker receives the API keys, OAuth tokens and repository keys Hex sends, and can alter API responses. Registry signatures and package checksums still prevent changes to registry contents and packages."}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"HIGH","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":5.9,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"ACTIVE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-295","description":"CWE-295 Improper Certificate Validation","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-10-12T15:17:45.545Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"name":"GitHub Advisory","tags":["related","vendor-advisory"],"url":"https://github.com/hexpm/hex/security/advisories/GHSA-rw8q-hg7m-cxgr"},{"name":"EEF CNA record for CVE-2026-103503","tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-103503.html"},{"name":"OSV record EEF-CVE-2026-103503","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-103503"},{"name":"Introducing commit c9b26a4 in hexpm/hex","tags":["related"],"url":"https://github.com/hexpm/hex/commit/c9b26a46928bfcd546773571e09c1d05f4cd9fb7"},{"name":"Fix commit 5f5a213 in hexpm/hex","tags":["patch"],"url":"https://github.com/hexpm/hex/commit/5f5a2136c7cf5991b6e8a30d645ca9f8e74b0785"},{"name":"Fix commit 6232a64 in hexpm/hex","tags":["patch"],"url":"https://github.com/hexpm/hex/commit/6232a6498015e559743bec4f4fbec9138837cec8"}],"solutions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Upgrade Hex to 2.5.2 or later, for example with <code>mix local.hex</code>. With <code>cacerts_path</code> (<code>HEX_CACERTS_PATH</code>) 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.</p>"},{"base64":false,"type":"text/markdown","value":"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."}],"value":"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."}],"source":{"discovery":"UNKNOWN"},"title":"Hex trusts its bundled CA certificates when cacerts_path is set","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>There's no Hex configuration that stops the bundled CAs from being trusted.</p>"},{"base64":false,"type":"text/markdown","value":"There's no Hex configuration that stops the bundled CAs from being trusted."}],"value":"There's no Hex configuration that stops the bundled CAs from being trusted."}],"x_proofOfConcept":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li>Create a PEM file that contains only an unrelated test CA certificate and set <code>cacerts_path</code> to it.</li>\n<li>Open a TLS connection to hex.pm with the options from <code>Hex.HTTP.SSL.ssl_opts(\"https://hex.pm\")</code>. The handshake succeeds, and the accepted chain leads to ISRG Root X2 cross-signed by ISRG Root X1, neither of which is in the PEM file.</li>\n<li>Remove the <code>partial_chain</code> option and connect again. The handshake fails with <code>unknown_ca</code>.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. Create a PEM file that contains only an unrelated test CA certificate and set `cacerts_path` to it.\n2. Open a TLS connection to hex.pm with the options from `Hex.HTTP.SSL.ssl_opts(\"https://hex.pm\")`. The handshake succeeds, and the accepted chain leads to ISRG Root X2 cross-signed by ISRG Root X1, neither of which is in the PEM file.\n3. Remove the `partial_chain` option and connect again. The handshake fails with `unknown_ca`."}],"value":"* Create a PEM file that contains only an unrelated test CA certificate and set cacerts_path to it.\n* Open a TLS connection to hex.pm with the options from Hex.HTTP.SSL.ssl_opts(\"https://hex.pm\"). The handshake succeeds, and the accepted chain leads to ISRG Root X2 cross-signed by ISRG Root X1, neither of which is in the PEM file.\n* Remove the partial_chain option and connect again. The handshake fails with unknown_ca."}],"x_technicalAnalysis":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li><code>Hex.HTTP.SSL.get_ca_certs/0</code> returns the certificates from <code>cacerts_path</code> when it's set, and <code>ssl_opts/1</code> passes them as <code>cacerts</code>.</li>\n<li><code>ssl_opts/1</code> sets <code>partial_chain</code> to <code>&amp;partial_chain(Certs.cacerts(), &amp;1)</code>, which always uses the bundled store.</li>\n<li>When the server's chain doesn't lead to a certificate in <code>cacerts</code>, OTP calls <code>partial_chain</code> with the chain. <code>partial_chain/2</code> returns <code>{:trusted_ca, der}</code> for the first certificate whose public key matches a bundled CA certificate, and OTP validates the chain with that certificate as the trust anchor.</li>\n<li>Chain validation and the hostname check from <code>customize_hostname_check/1</code> still run, so the attacker needs a certificate for the requested host that chains to a bundled CA.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. `Hex.HTTP.SSL.get_ca_certs/0` returns the certificates from `cacerts_path` when it's set, and `ssl_opts/1` passes them as `cacerts`.\n2. `ssl_opts/1` sets `partial_chain` to `&partial_chain(Certs.cacerts(), &1)`, which always uses the bundled store.\n3. When the server's chain doesn't lead to a certificate in `cacerts`, OTP calls `partial_chain` with the chain. `partial_chain/2` returns `{:trusted_ca, der}` for the first certificate whose public key matches a bundled CA certificate, and OTP validates the chain with that certificate as the trust anchor.\n4. Chain validation and the hostname check from `customize_hostname_check/1` still run, so the attacker needs a certificate for the requested host that chains to a bundled CA."}],"value":"* Hex.HTTP.SSL.get_ca_certs/0 returns the certificates from cacerts_path when it's set, and ssl_opts/1 passes them as cacerts.\n* ssl_opts/1 sets partial_chain to &partial_chain(Certs.cacerts(), &1), which always uses the bundled store.\n* When the server's chain doesn't lead to a certificate in cacerts, OTP calls partial_chain with the chain. partial_chain/2 returns {:trusted_ca, der} for the first certificate whose public key matches a bundled CA certificate, and OTP validates the chain with that certificate as the trust anchor.\n* Chain validation and the hostname check from customize_hostname_check/1 still run, so the attacker needs a certificate for the requested host that chains to a bundled CA."}]}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-103503","datePublished":"2026-10-12T15:17:45.545Z","dateReserved":"2026-10-08T15:45:02.372Z","dateUpdated":"2026-10-12T15:17:45.545Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"}