{"id":"CVE-2026-103503","revision":"02499f86593943c3bbbdbccf6ec72e0b","records":[{"revision":"02499f86593943c3bbbdbccf6ec72e0b","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-103503","aliases":[],"title":"Hex trusts its bundled CA certificates when cacerts_path is set","description":"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.","state":0,"publishedAt":"2026-10-12T15:17:45.545+00:00","modifiedAt":"2026-10-16T17:32:45.735+00:00","affected":[{"ecosystem":"Vendor product","name":"hex","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"cpes\": [\n                        \"cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*\"\n                    ],\n                    \"defaultStatus\": \"unaffected\",\n                    \"modules\": [\n                        \"'Elixir.Hex.HTTP.SSL'\"\n                    ],\n                    \"packageName\": \"hex\",\n                    \"packageURL\": \"pkg:otp/hex?repository_url=https:%2F%2Fgithub.com%2Fhexpm%2Fhex&vcs_url=repository_url=git%2Bhttps:%2F%2Fgithub.com%2Fhexpm%2Fhex.git\",\n                    \"product\": \"hex\",\n                    \"programFiles\": [\n                        \"lib/hex/http/ssl.ex\"\n                    ],\n                    \"programRoutines\": [\n                        {\n                            \"name\": \"'Elixir.Hex.HTTP.SSL':ssl_opts/1\"\n                        },\n                        {\n                            \"name\": \"'Elixir.Hex.HTTP.SSL':partial_chain/2\"\n                        }\n                    ],\n                    \"repo\": \"https://github.com/hexpm/hex\",\n                    \"vendor\": \"hexpm\",\n                    \"versions\": [\n                        {\n                            \"lessThan\": \"2.5.2\",\n                            \"status\": \"affected\",\n                            \"version\": \"0.20.2\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"},{"ecosystem":"https://github.com","name":"hexpm/hex","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"collectionURL\": \"https://github.com\",\n                    \"cpes\": [\n                        \"cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*\"\n                    ],\n                    \"defaultStatus\": \"unaffected\",\n                    \"modules\": [\n                        \"'Elixir.Hex.HTTP.SSL'\"\n                    ],\n                    \"packageName\": \"hexpm/hex\",\n                    \"packageURL\": \"pkg:github/hexpm/hex\",\n                    \"product\": \"hex\",\n                    \"programFiles\": [\n                        \"lib/hex/http/ssl.ex\"\n                    ],\n                    \"programRoutines\": [\n                        {\n                            \"name\": \"'Elixir.Hex.HTTP.SSL':ssl_opts/1\"\n                        },\n                        {\n                            \"name\": \"'Elixir.Hex.HTTP.SSL':partial_chain/2\"\n                        }\n                    ],\n                    \"repo\": \"https://github.com/hexpm/hex\",\n                    \"vendor\": \"hexpm\",\n                    \"versions\": [\n                        {\n                            \"changes\": [\n                                {\n                                    \"at\": \"5f5a2136c7cf5991b6e8a30d645ca9f8e74b0785\",\n                                    \"status\": \"unaffected\"\n                                },\n                                {\n                                    \"at\": \"6232a6498015e559743bec4f4fbec9138837cec8\",\n                                    \"status\": \"unaffected\"\n                                }\n                            ],\n                            \"lessThan\": \"*\",\n                            \"status\": \"affected\",\n                            \"version\": \"c9b26a46928bfcd546773571e09c1d05f4cd9fb7\",\n                            \"versionType\": \"git\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"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","score":5.9,"severity":"MEDIUM"}],"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"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-103503","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-103503","identifiers":["CVE-2026-103503"]},"retained":false,"historicalAffected":[]}],"coverage":[]}