Improper Certificate Validation vulnerability in hexpm hex_core allows an attacker who can intercept HTTPS connections to impersonate hex.pm,… (CVE-2026-103502)
Description
An improper certificate validation vulnerability exists in hexpm's hex_core library affecting versions before 0.20.0. This flaw allows an attacker who can intercept HTTPS connections to impersonate hex.pm or related repositories when using hex_core's default HTTP adapter on Erlang/OTP 24 or OTP 25 without a loaded CA certificate store. The issue arises because the default HTTP adapter falls back to insecure SSL options that do not verify server certificates in these environments. hex_core 0.11.0 and later added secure SSL defaults for OTP 25+, but earlier versions remain vulnerable. The vulnerability is documented but the warnings and README do not clearly communicate the lack of certificate verification under certain conditions.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
hex_core's default HTTP adapter uses the built-in httpc adapter which attempts to verify server certificates using public_key:cacerts_get/0. On Erlang/OTP 24, this function does not exist, causing all HTTPS requests to skip certificate verification. On OTP 25, if the operating system's CA certificates cannot be loaded, the function raises an error, triggering a fallback to default ssl options that do not verify certificates prior to OTP 26. hex_core versions before 0.11.0 never set ssl options explicitly, resulting in no certificate verification on OTP 25 and earlier regardless of CA store presence. Although warnings exist in the README and adapter logs about insecure defaults, they do not explicitly state the absence of certificate verification or clarify affected OTP versions. This vulnerability allows attackers capable of intercepting HTTPS traffic to impersonate trusted servers to clients using vulnerable hex_core versions on affected OTP versions.
Potential Impact
An attacker who can intercept HTTPS connections can impersonate hex.pm, repo.hex.pm, or other API servers to clients using vulnerable hex_core versions on Erlang/OTP 24 or OTP 25 without CA certificates. This undermines the authenticity of HTTPS communications, potentially enabling man-in-the-middle attacks, data interception, or injection of malicious content during package retrieval or API interactions. The vulnerability affects the trust model of TLS connections in these environments.
Mitigation Recommendations
Users should upgrade hex_core to version 0.20.0 or later, which addresses the issue by enforcing certificate verification with secure SSL defaults on OTP 25 and above. For environments running OTP 24 or OTP 25 without CA certificates, upgrading the Erlang/OTP runtime to version 26 or later, which verifies certificates by default, is recommended. Users should also consider using alternative HTTP clients as suggested in the hex_core README to avoid relying on the insecure default httpc adapter. The vendor advisory does not indicate that this issue is already mitigated or that no action is required.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-5rf8-f3v4-rg98
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-103502"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6acd55682cdf04f656da885d
Added to database: 10/12/2026, 21:47:20 UTC
Last enriched: 10/12/2026, 22:07:05 UTC
Last updated: 10/13/2026, 03:48:08 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.