Skip to main content

hex_core EUVDEUVD-2026-97450

| CVE-2026-103502 MEDIUM
Improper Certificate Validation (CWE-295)
2026-10-12 EEF GHSA-5rf8-f3v4-rg98
5.9
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain on-path/MITM position on victim network
  2. Delivery
    Intercept hex_core HTTPS request to hex.pm
  3. Exploit
    Present forged server certificate (unverified)
  4. Execution
    Serve malicious registry metadata or tarball
  5. Impact
    Compromise dependency resolution / build pipeline

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V12 - Secure Communication Certificate validation
Exploitation Conditions

Exploitation requires an attacker who can intercept the victim's HTTPS traffic (on-path/MITM position) AND a target using hex_core's built-in hex_http_httpc adapter via hex_core:default_config/0 with no ssl option set. The vulnerable configurations are: hex_core 0.1.0 through before 0.11.0 on OTP 25 and earlier (ssl options never set); OR hex_core 0.11.0-before 0.20.0 running on Erlang/OTP 24 (public_key:cacerts_get/0 does not exist, so every request falls back to insecure defaults); OR on OTP 25 when the operating system's CA certificate store cannot be loaded (cacerts_get/0 raises and the adapter sends the request without ssl options). Key limiting factors: the attacker must already hold a privileged network position, a Hex fetch must be actively triggered, and OTP 26+ verifies certificates by default even without the fix, which substantially narrows the exposed population.

Impact

This is a genuine but conditional MITM vulnerability (CWE-295) rather than a remotely-triggerable code-exec issue, and the signals are internally consistent at a Medium level. The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:A, score 5.9) correctly encodes the two real gates: AT:P reflects the passive precondition that the attacker must already be positioned to intercept the victim's HTTPS traffic, and UI:A reflects that a user/CI job must actively trigger a Hex fetch. VC:H/VI:L is appropriate because a successful impersonation lets an attacker feed forged package metadata/tarballs (confidentiality of the channel is fully broken; integrity impact is bounded because tarball checksums/registry signatures still provide some protection). No EPSS score was provided in the input, so probabilistic exploitation likelihood cannot be quantified. The product is NOT on CISA KEV and no public exploit code is referenced, so exploitation status is 'no public exploit identified at time of analysis.' Net judgment: this is a real but lower-urgency hygiene fix for most defenders - it requires an on-path/MITM attacker AND a vulnerable OTP configuration (OTP 24, OTP 25 without loadable CA certs, or any hex_core < 0.11.0 on OTP 25 and earlier) AND use of the default httpc adapter - so it is not a drive-by internet-wide threat, but it is high-value for supply-chain attackers targeting Elixir/Erlang build pipelines over untrusted networks.

Exploit ScenarioDerived

An attacker on a shared or compromised network path (e.g. hostile Wi-Fi, a malicious proxy, or a compromised CI egress) intercepts a developer's or CI job's HTTPS request to repo.hex.pm made through hex_core's default httpc adapter on a vulnerable OTP configuration. Because the server certificate is not verified, the attacker presents a forged certificate, impersonates hex.pm, and returns malicious registry metadata or a tampered package tarball. No public exploit code is identified, but the technique is standard TLS interception and requires no authentication to the victim.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 12, 2026

Improper TLS server-certificate validation in hex_core (0.1.0 through versions before 0.20.0) lets an attacker who already holds an on-path/Man-in-the-Middle position impersonate hex.pm, repo.hex.pm, or any other repository or API endpoint to any Erlang/Elixir program using the library's built-in hex_http_httpc adapter selected by hex_core:default_config/0. The adapter is affected when it cannot obtain a CA trust store: all HTTPS requests fall back to insecure ssl defaults on Erlang/OTP 24 (public_key:cacerts_get/0 does not exist), hex_core before 0.11.0 never set ssl options at all, and on OTP 25 the fallback triggers whenever the OS certificate store cannot be loaded - although the CVSS 4.0 vector still requires user interaction because a Hex fetch must actually be triggered, and OTP 26+ verifies certificates by default even without the fix. No confirmed in-the-wild exploitation and no public exploit code were identified at time of analysis, and the primary risk is data/registry-response disclosure and package-fetch integrity (CWE-295, tagged Information Disclosure) rather than remote code execution.

RemediationAI

Upgrade to hex_core 0.20.0, the first release outside the affected range per the advisory, which adds certificate verification and secure SSL defaults; the upstream fix is the commit https://github.com/hexpm/hex_core/commit/b7b3a42defb4ed8e20a5c68a4412ce68a95b7938 referenced in the advisory, so pinning to a 0.20.0-or-later tag is the primary remediation. If upgrading is not immediately possible, supply an explicit ssl option in the adapter configuration (for example an ssl list containing verify_peer, cacerts sourced from a trusted store, and appropriate depth/fail_if_no_peer_cert settings) so hex_http_httpc never takes the fallback path, or replace the default adapter with a different, TLS-verifying HTTP client - hex_core's own README has recommended alternatives since 0.8.2 precisely because the built-in httpc adapter "has insecure default settings." Running on Erlang/OTP 26 or later causes httpc to verify peer certificates by default even when no ssl options are passed, which mitigates the downgrade but does not remove the need to patch; conversely, ensuring a valid OS CA trust store is present avoids the OTP 25 cacerts_get/0 failure mode but does nothing for OTP 24 or for hex_core releases before 0.11.0. The trade-off to weigh: forcing verify_peer with a strict cacerts list will break builds that previously succeeded against repositories using private/self-signed CAs, so per-repository trust configuration should be staged before enforcement, and because this is a Man-in-the-Middle issue, network-layer controls (TLS inspection with trusted enterprise CAs and egress restrictions to known Hex endpoints) only reduce - not eliminate - the window while patching proceeds. Vendor and coordinator guidance is available at https://github.com/hexpm/hex_core/security/advisories/GHSA-p26c-h8c2-rwqj, https://cna.erlef.org/cves/CVE-2026-103502.html, and https://osv.dev/vulnerability/EEF-CVE-2026-103502.

Affected VersionsENISA

hex_core 0.1.0 <0.20.0
hex_core fbb6d9de472e5edb8d6fb6b32a91cb266137892e <b7b3a42defb4ed8e20a5c68a4412ce68a95b7938

Affected Packages

euvd hex_core fix: 0.20.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

hex_core is the Erlang library implementing the Hex package manager protocol, used to fetch package registry metadata and tarballs. Its default HTTP adapter, hex_http_httpc, delegates to the inets httpc client and is chosen by hex_core:default_config/0. The root cause is CWE-295 (Improper Certificate Validation): hex_http_httpc:http_options/2 attempts to build a secure option list by calling public_key:cacerts_get/0 to obtain the system CA store; when that call raises, the adapter logs a warning ("using default ssl options which are insecure") and sends the request with no ssl options at all, so httpc falls back to the ssl application defaults. Before OTP 26 those defaults do not verify the peer certificate and do not fail on a bad chain, so any on-path attacker with a self-signed or attacker-issued certificate can transparently terminate TLS. Three distinct trigger paths exist: public_key:cacerts_get/0 does not exist on OTP 24, so every HTTPS request from any hex_core version falls back there; hex_core versions prior to 0.11.0 never populated ssl options, so they fail to verify on OTP 25 and earlier regardless of whether a CA store is available; and on OTP 25 with no loadable OS CA store, cacerts_get/0 raises and the adapter downgrades. The behavior was documented as a deliberate fallback but the documentation never made clear that the consequence was the total absence of certificate verification, and the runtime warning's guidance to upgrade to OTP 25+ is unhelpful for users already on OTP 25. The affected CPE is cpe:2.3:a:hexpm:hex_core (all versions in the vulnerable range).

Know when Hexpm gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (EEF) PRIMARY 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
vuln.today AI 5.9 MEDIUM

AC:H because the attacker must achieve an on-path MITM position; UI:R because a user/CI job must trigger the Hex fetch; C:H for full channel interception, I:L for bounded tampering.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (EEF).

CVSS VectorVendor: EEF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Medium
reference Hex client used by Mix/Rebar3 across Elixir/Erlang ecosystem
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Hexpm

View all
CVE-2026-21622 CRITICAL
9.5 Mar 05

Insufficient session expiration in hexpm. Password reset tokens never expire, enabling persistent account takeover.

CVE-2026-32148 HIGH
8.9 Apr 30

Silent dependency checksum bypass in hexpm/hex package manager (versions 0.16.0 through 2.4.1) allows attackers to subst

CVE-2026-21618 HIGH
8.5 Jan 19

Improper input sanitization in hexpm's SharedAuthorizationView module allows unauthenticated attackers to inject malicio

CVE-2026-75542 HIGH
8.3 Aug 24

Incorrect authorization in the hex.pm OAuth `client_credentials` endpoint allows any API key bearing the `repositories`

CVE-2026-96612 HIGH
7.5 Oct 12

Path traversal in the Hex package manager for the Elixir/Erlang (Mix) ecosystem, versions 0.6.0 through 2.5.1, lets a ma

CVE-2026-105668 HIGH
7.1 Oct 12

Hex, the package manager used by Elixir and Erlang projects, fails to properly scope its 'release-age cooldown' protecti

CVE-2026-23940 HIGH
7.1 Mar 13

An uncontrolled resource consumption vulnerability in the Hex.pm package manager allows authenticated attackers to cause

CVE-2026-21621 HIGH
7.0 Mar 05

Hexpm's OAuth implementation fails to enforce read-only API key restrictions during token exchange, allowing an attacker

CVE-2026-105280 MEDIUM
6.9 Oct 12

Integrity-check bypass in the Hex package manager (hexpm hex) allows a compromised or attacker-controlled package mirror

CVE-2026-23939 MEDIUM
6.9 Feb 26

Path traversal in hexpm's Local Storage backend allows unauthenticated attackers to read sensitive files through relativ

CVE-2026-103503 MEDIUM
5.9 Oct 12

Improper certificate validation in Hex (the Elixir/Erlang package manager client, versions 0.20.2 through 2.5.1) allows

CVE-2026-96596 MEDIUM
5.9 Oct 14

Denial of service in Erlang OTP's stdlib erl_tar module (OTP 29.0 before 29.1.2, stdlib 8.0 before 8.1.1) allows an atta

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy