CVE-2026-103502: CWE-295 Improper Certificate Validation in hexpm hex_core
Description
CVE-2026-103502 is an improper certificate validation vulnerability in the hexpm hex_core library affecting versions from 0.1.0 up to but not including 0.20.0. It allows an attacker who can intercept HTTPS connections to impersonate hex.pm, repo.hex.pm, or other repository/API servers when using hex_core's default HTTP adapter on Erlang/OTP 24 or OTP 25 if the OS CA certificates cannot be loaded. This occurs because the default HTTP adapter falls back to insecure SSL options that do not verify server certificates in these environments. The issue was addressed in hex_core 0.11.0 by enabling secure SSL defaults for OTP 25 and later. The vulnerability has a CVSS 4.0 score of 5.9 (medium severity).
CVSS v4.0
Score 5.9medium
Affected software
hexpm
hex_core
hexpm
hex_core
cpe:2.3:a:hexpm:hex_core:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from hex_core's default HTTP adapter (hex_http_httpc) which, on Erlang/OTP 24 or OTP 25 without accessible CA certificates, sends HTTPS requests without verifying server certificates. This fallback behavior is due to public_key:cacerts_get/0 raising an error or being unavailable, causing the adapter to omit SSL verification options. Versions of hex_core before 0.11.0 never set SSL options, resulting in no certificate verification on OTP 25 and earlier regardless of CA store presence. Although warnings and documentation mention insecure defaults, they do not clearly state that server certificates are not verified, potentially misleading users. The issue affects hex_core versions >=0.1.0 and <0.20.0 and was fixed by adding secure SSL defaults starting with version 0.11.0.
Potential Impact
An attacker capable of intercepting HTTPS connections can impersonate hex.pm, repo.hex.pm, or other API servers to clients using vulnerable hex_core versions on OTP 24 or OTP 25 without CA certificates. This can lead to man-in-the-middle attacks where the client accepts fraudulent server certificates, undermining the authenticity and confidentiality of communications. The vulnerability does not require privileges or authentication but does require network interception capability.
Mitigation Recommendations
Users should upgrade hex_core to version 0.20.0 or later, where secure SSL defaults are enforced, including certificate verification on OTP 25 and later. For OTP 24 or OTP 25 environments without CA certificates, ensure that CA stores are properly installed and accessible to avoid fallback to insecure SSL options. The advisory notes that the issue was fixed starting with hex_core 0.11.0 by enabling secure SSL defaults. No other specific mitigations are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-10-09T16:45:02.344Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6acce8d92cdf04f6569d8fa7
Added to database: 10/12/2026, 14:04:09 UTC
Last enriched: 10/12/2026, 14:19:08 UTC
Last updated: 10/13/2026, 03:48:08 UTC
Views: 13
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.