Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessHold org-scoped OAuth refresh token
-
DeliveryRemoved from organization by admin
-
ExploitCall OAuth refresh grant endpoint
-
ExecutionServer re-derives token from stale granted_scopes
-
PersistCDN edge validates scope claim without DB lookup
-
ImpactDownload private organization packages
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V7 - Session Management Session expiration enforcement
|
| Exploitation Conditions | Exploitation requires three specific conditions: (1) the attacker must have been an authenticated member of a hex.pm private organization; (2) at the time of membership revocation, the attacker must hold an OAuth refresh token whose granted_scopes contain an explicit repository:<org> or docs:<org> scope (the expanded, organization-named form - not merely the generic repositories scope); and (3) the deployment must use CDN-edge authorization that validates access from token claims without live database queries, which is the default hex.pm architecture. Exploitation is read-only - no write, publish, or administrative capability is obtainable. Access is strictly bounded by the 30-day refresh token lifetime; once that expires, further refresh attempts will fail. Users who held only the generic repositories or api scopes are not affected. |
| Impact | The CVSS 4.0 score of 2.3 (AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N) is well-calibrated for this vulnerability. The AT:P (attack precondition present) metric correctly captures the key constraint: exploitation requires a pre-existing OAuth token with an explicit organization scope in granted_scopes, meaning only users who previously held such a token are affected. PR:L reflects that the attacker must have been a legitimate, authenticated member. The confidentiality impact is narrow - read-only access to private package contents - with no integrity or availability exposure. No EPSS score was supplied in the input, and the vulnerability is absent from CISA KEV, providing no evidence of active exploitation. There is no public exploit code. The net real-world risk is low: the blast radius is limited to a small population (recently removed org members with scoped tokens), the access window is bounded to 30 days, and the only capability gained is private package download. No signals conflict with the supplied CVSS vector. |
| Exploit ScenarioDerived | A former organization member who holds an OAuth refresh token with a previously granted repository:<org> scope is removed from the organization by an administrator. The attacker invokes the standard OAuth refresh grant endpoint, receiving a fresh access token that still carries the repository:<org> scope because granted_scopes is not re-validated against current membership. The attacker then uses this access token against the CDN edge to download private packages, with the cycle repeatable for the full 30-day refresh token lifetime. No proof-of-concept code has been publicly released. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 24, 2026
OAuth token refresh in hex.pm (Elixir's package registry) fails to re-validate organizational membership when issuing new access tokens, allowing users removed from a private organization to retain read access to its packages. Affected are hex.pm deployments from 2025-10-10 through 2026-08-24. An authenticated former member can repeatedly refresh a token carrying an explicit repository:<org> or docs:<org> scope - bypassing revocation entirely for up to 30 days - because CDN edges authorize access from token claims without querying the database. No public exploit exists and this is not in CISA KEV.
RemediationAI
The upstream fix is available in commit 50cffd206490c49c92d7b63c8505949682abedb0 (https://github.com/hexpm/hexpm/commit/50cffd206490c49c92d7b63c8505949682abedb0), which introduces Permissions.reject_unaffiliated_scopes/2 to filter out organization scopes for users no longer affiliated with that organization during every token refresh. Operators of self-hosted hexpm instances should update to the patched version released 2026-08-24; the vendor advisory at https://github.com/hexpm/hexpm/security/advisories/GHSA-24ww-j3f4-p49c should be consulted for deployment instructions. As an immediate compensating control for deployments that cannot patch promptly, administrators should manually revoke refresh tokens for all recently removed organization members via the hexpm admin interface; membership revocation alone is insufficient since it does not invalidate existing tokens. Note that token revocation may disrupt legitimate CI/CD workflows that rely on the affected tokens.
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
The vulnerability is in hex.pm's Elixir/Phoenix OAuth implementation, specifically in lib/hexpm/oauth/tokens.ex and lib/hexpm/permissions.ex. The expand_repositories_scope/3 function only rewrites the literal repositories scope; explicitly granted repository:<org> or docs:<org> scopes pass through it unchanged and persist in granted_scopes. On each refresh grant, the new token is derived from stored granted_scopes rather than re-computing scope from current membership, so the stale organizational scope is perpetually reproduced. Both CDN edges trust token claims for package access without live database lookups, meaning the scope embedded in the token is the sole access-control signal. Root cause class is CWE-613 (Insufficient Session Expiration): membership revocation does not invalidate or restrict derived tokens within their lifetime. Affected product identified by CPE cpe:2.3:a:hexpm:hexpm:*:*:*:*:*:*:*:*.
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:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N
Requires authenticated prior membership (PR:L) and a pre-existing org-scoped token (AC:H); read-only confidentiality impact with no integrity or availability exposure.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
DescriptionCVE.org
Insufficient Session Expiration vulnerability in the OAuth token refresh grant in hexpm hexpm allows a user removed from an organization to keep reading its private packages.
expand_repositories_scope/3 in lib/hexpm/permissions.ex only rewrites the literal repositories scope, so an explicitly granted repository:<org> or docs:<org> scope passes through it untouched. The refresh grant re-derives a new token from the stored granted_scopes, which holds that expanded form, so every refresh reproduces the organization scope without revisiting membership. Because both CDN edges authorize repository access from the token claim without querying the database, an account removed from an organization retains read access for as long as it keeps refreshing, bounded by the 30 day refresh token lifetime rather than the 30 minute access token lifetime.
This issue affects hex.pm: from 2025-10-10 before 2026-08-24.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
Incorrect authorization in the hex.pm OAuth `client_credentials` endpoint allows any API key bearing the `repositories`
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
EUVD-2026-65120
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB