Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain API key with repositories permission
-
DeliveryCraft client_credentials token request with foreign repository:<org> scope
-
ExploitUnpatched endpoint mints token without principal validation
-
ExecutionPresent token to CDN edge
-
ImpactExfiltrate target organization's private packages
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a valid hex.pm API key that carries the |
| Impact | The CVSS 4.0 score of 8.3 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N) accurately reflects the core threat posture: network-reachable, low complexity, requiring only a valid repositories-scoped API key, with high confidentiality impact extending across organizational boundaries. No EPSS score was included in the intelligence package, so exploitation probability cannot be quantified numerically; however, the attack is mechanically trivial - a single modified OAuth request - and the advisory plus patch diff together constitute a near-complete exploitation recipe, so real-world exploitation likelihood post-disclosure should be treated as elevated. There is no CISA KEV listing and no reported POC code, meaning this is not confirmed actively exploited. The impact is strictly read-only (VI:N, VA:N), limiting blast radius to confidentiality of private package contents rather than infrastructure compromise. The SC:H rating is justified: the exploiting principal crosses into a completely separate organizational trust domain. Real-world risk is meaningful for any organization hosting private packages on hex.pm, particularly those with sensitive intellectual property or internal tooling distributed through the registry. |
| Exploit ScenarioDerived | An attacker holding a hex.pm API key with the |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 24, 2026
Incorrect authorization in the hex.pm OAuth client_credentials endpoint allows any API key bearing the repositories permission to mint tokens scoped to arbitrary organizations' private packages. The flaw in validate_scopes_against_key/2 accepted any scope string prefixed with repository: without resolving the organization name against the authenticated principal's actual memberships; because CDN edges evaluate repository access from token claims alone without querying the database, a minted token grants persistent read access to the targeted organization's private packages until expiration. No public exploit code has been identified at time of analysis, but the vulnerability mechanics are fully disclosed in the public advisory and patch diff.
RemediationAI
The vendor-released patch is available as commit bf0fb9d208f0acfabf7a2f7467c8231659e322a8 (https://github.com/hexpm/hexpm/commit/bf0fb9d208f0acfabf7a2f7467c8231659e322a8); operators self-hosting hex.pm should update to a version incorporating this commit immediately. The fix adds principal-aware scope resolution via a new reaches_repository?/2 function that validates repository:<name> scopes against the authenticated principal's actual organization memberships using Hexpm.Permissions.verify_user_access/3, and adds a defense-in-depth foreign_organization_scope?/2 filter in lib/hexpm/oauth/tokens.ex that strips cross-organization scopes at token minting time even if grant validation were to pass them through. Until patched, the most effective compensating control is restricting issuance of API keys carrying the repositories permission to the minimum necessary principals; this reduces the pool of potential exploiters but does not eliminate the vulnerability for those who legitimately hold such keys. Post-patch, auditing OAuth token issuance logs for repository:<name> scopes naming organizations the key holder does not belong to may surface prior exploitation. Full advisory is at https://github.com/hexpm/hexpm/security/advisories/GHSA-rfx8-w654-8cpr.
Affected VersionsENISA
Affected Packages
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.pm is the canonical package registry for the Elixir and Erlang ecosystems, implementing OAuth 2.0 client_credentials grant flow for programmatic access by users and CI/CD pipelines. The vulnerability resides in lib/hexpm_web/controllers/api/oauth_controller.ex within validate_scopes_against_key/2, which evaluated only whether the key carried the repositories permission and whether the requested scope string began with repository: - never resolving the organization name in the scope against the principal's actual memberships. The expand_repositories_scope/3 helper compounded the issue by transforming only the generic repositories scope literal, leaving explicit repository:<name> requests untouched and unvalidated. CWE-863 (Incorrect Authorization) precisely describes this class: an authorization check is present but evaluates an insufficient condition. CPE cpe:2.3:a:hexpm:hexpm:*:*:*:*:*:*:*:* covers the affected range. The CDN layer's architecture - trusting token claims without backend re-verification - extended the window of unauthorized access to the full token lifetime.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Network endpoint requiring a valid API key (PR:L); scope change (S:C) because token crosses into a separate organization's trust domain; no integrity or availability impact.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
DescriptionCVE.org
Incorrect Authorization vulnerability in the OAuth token endpoint in hexpm hexpm allows an API key holding the repositories permission to read another organization's private packages.
When an API key is exchanged for a token through the OAuth client_credentials grant, validate_scopes_against_key/2 in lib/hexpm_web/controllers/api/oauth_controller.ex admits a requested scope whenever the key carries the repositories permission and the scope string begins with repository:. The organization name is never resolved against the principal, and expand_repositories_scope/3 only rewrites the literal repositories scope, so an explicit repository:<name> passes through untouched. Both CDN edges authorize repository access from the token claim without querying the database, so the minted token is read access to that organization's private packages until it expires.
This issue affects hex.pm: from 2025-10-18 before 2026-08-24.
Executive ViewAI
A flaw in hex.pm's credential system allows authorized developers to access private packages from other organizations on the platform. Organizations storing proprietary Elixir code in hex.pm face exposure of their intellectual property to users outside their organization. This represents a critical data loss risk for any team relying on hex.pm for secure package management.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Insufficient session expiration in hexpm. Password reset tokens never expire, enabling persistent account takeover.
Silent dependency checksum bypass in hexpm/hex package manager (versions 0.16.0 through 2.4.1) allows attackers to subst
Improper input sanitization in hexpm's SharedAuthorizationView module allows unauthenticated attackers to inject malicio
Path traversal in the Hex package manager for the Elixir/Erlang (Mix) ecosystem, versions 0.6.0 through 2.5.1, lets a ma
Hex, the package manager used by Elixir and Erlang projects, fails to properly scope its 'release-age cooldown' protecti
An uncontrolled resource consumption vulnerability in the Hex.pm package manager allows authenticated attackers to cause
Hexpm's OAuth implementation fails to enforce read-only API key restrictions during token exchange, allowing an attacker
Integrity-check bypass in the Hex package manager (hexpm hex) allows a compromised or attacker-controlled package mirror
Path traversal in hexpm's Local Storage backend allows unauthenticated attackers to read sensitive files through relativ
Improper TLS server-certificate validation in hex_core (0.1.0 through versions before 0.20.0) lets an attacker who alrea
Improper certificate validation in Hex (the Elixir/Erlang package manager client, versions 0.20.2 through 2.5.1) allows
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
EUVD-2026-65119
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB