cve.bz

CVE-2026-103502 hexpm hex core: Improper Certificate Validation

5.9 mediumEPSS 0.2%Fix available

Medium (5.9) in hexpm hex core. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in hex_core 0.20.0.

On this page
Improper Certificate Validation vulnerability in hexpm hex_core allows an attacker who can intercept HTTPS connections to impersonate hex.pm, repo.hex.pm or any other repository or API server to programs that use hex_core's default HTTP adapter on Erlang/OTP 24, or on OTP 25 when the operating system's CA certificates can't be loaded. hex_core:default_config/0 selects the built-in hex_http_httpc adapter. For an HTTPS request whose adapter config has no ssl option, hex_http_httpc:http_options/2 builds options that verify the server certificate against public_key:cacerts_get/0. When that call raises, the adapter prints a warning and sends the request without ssl options, so httpc uses the defaults of the ssl application, which before OTP 26 don't verify the server certificate. public_key:cacerts_get/0 doesn't exist on OTP 24, so every HTTPS request falls back there, and on OTP 25 it raises when no CA store is found. hex_core versions before 0.11.0 never set ssl options, so they don't verify the server certificate on OTP 25 and earlier whether or not a CA store is found. The fallback was intended and documented, but the documentation didn't make clear that it meant no certificate verification. Since hex_core 0.8.2 the README has warned that the built-in httpc adapter "has insecure default settings" and recommended other HTTP clients, and the adapter prints "using default ssl options which are insecure" on every request that falls back. hex_core 0.11.0 added certificate verification with the changelog entry "Use secure SSL defaults for OTP 25+". Neither the README nor the warning says that the server certificate isn't verified, the README doesn't say which OTP versions the warning applies to, and on OTP 25 without CA certificates the warning tells users to upgrade to OTP 25 or later, which they already run. This advisory is published so that users who took those notices as general advice know their HTTPS requests weren't authenticated. This issue affects hex_core: from 0.1.0 before 0.20.0.

Severity

CVSS 4.0

5.9 medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 15th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-10-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-295 Improper Certificate Validation
CWE-636 Not Failing Securely (Failing Open)
OWASP Top 10
A07:2025 Authentication Failures, A10:2025 Mishandling of Exceptional Conditions
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-103502 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-103502?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-103502?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-103502 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
hexpm hex_corefrom 0.1.0 before 0.20.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
EEF-CVE-2026-103502Hexhex_core>=0.1.0 <0.20.00.20.0
EEF-CVE-2026-103502no fix published

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian13erlang-hexno fix listedDEBIAN-CVE-2026-103502
Debian14erlang-hex2.5.3-2DEBIAN-CVE-2026-103502
Ubuntu22.04:LTSrebar3no fix listedUBUNTU-CVE-2026-103502
Ubuntu24.04:LTS, 26.04:LTS, 26.10rebar3, erlang-hexno fix listedUBUNTU-CVE-2026-103502

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A moderate-impact vulnerability was found in hex_core, the Erlang/Elixir client library for the Hex package repository. hex_core's default HTTP adapter, hex_http_httpc, does not verify TLS server certificates when running on Erlang/OTP 24, or on OTP 25 when the operating system's CA certificates cannot be loaded: when the adapter cannot build certificate-verification options, it falls back to the ssl application's insecure connection defaults rather than aborting the request. A network attacker able to intercept HTTPS connections could exploit this to impersonate hex.pm or other repository and API servers, capture sensitive information sent by client programs such as API keys, OAuth tokens, and repository keys, and alter API requests and responses. Registry signatures, which hex_core verifies by default, still prevent changes to registry package contents, so package contents cannot be tampered with. Red Hat rates this flaw as Moderate severity, consistent with the upstream Medium rating. No Red Hat products are currently listed as affected by this flaw.

Red Hat's mitigation

Users of the default hex_http_httpc adapter can work around this issue by configuring SSL options that verify the server certificate (for example, verify_peer with a trusted CA certificate store) in the adapter's http_options, such as {hex_http_httpc, #{http_options => [{ssl, SslOpts}]}}, by using an alternative HTTP adapter that performs certificate verification, or by running on Erlang/OTP 26 or later, where the ssl application verifies server certificates by default. Upgrading hex_core to version 0.20.0 or later, where HTTPS requests fail rather than fall back to insecure defaults when CA certificates are unavailable, resolves the issue.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-103502.

Attack patterns (CAPEC)

  • CAPEC-459 Creating a Rogue Certification Authority Certificate Likelihood: Medium · Severity: Very High
  • CAPEC-475 Signature Spoofing by Improper Validation Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON