Skip to main content

Improper Certificate Validation vulnerability in hexpm hex_core allows an attacker who can intercept HTTPS connections to impersonate hex.pm,… (CVE-2026-103502)

0
Medium
Published: 10/12/2026 (10/12/2026, 15:32:16 UTC)
Source: GCVE Database

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
Scope
X
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Affected software

hex_core
pkg:hex/hex_core
Affected versions
<0.20.0

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

AILast updated: 10/12/2026, 22:07:05 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses