CVE-2026-75542
OAuth token exchange grants repository scopes for organizations the principal cannot access
Description
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.
INFO
Published Date :
Aug. 24, 2026, 9:17 p.m.
Last Modified :
Aug. 24, 2026, 9:17 p.m.
Remotely Exploit :
Yes !
Source :
6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Affected Products
The following products are affected by CVE-2026-75542
vulnerability.
Even if cvefeed.io is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
No affected product recoded yet
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 4.0 | HIGH | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | ||||
| CVSS 4.0 | HIGH | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db |
Solution
- Update hexpm to a patched version.
- Validate token scopes against the requesting principal.
- Ensure organization names are properly checked.
- Restrict repository access based on token claims.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-75542.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-75542 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-75542
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-75542 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-75542 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
New CVE Received by 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Aug. 24, 2026
Action Type Old Value New Value Added Affected [{'cpes': ['cpe:2.3:a:hexpm:hexpm:*:*:*:*:*:*:*:*'], 'vendor': 'hexpm', 'modules': ["'Elixir.HexpmWeb.API.OAuthController'", "'Elixir.Hexpm.OAuth.Tokens'"], 'product': 'hexpm', 'versions': [{'status': 'affected', 'version': '2025-10-18', 'lessThan': '2026-08-24', 'versionType': 'date'}], 'packageName': 'hex.pm', 'programFiles': ['lib/hexpm_web/controllers/api/oauth_controller.ex', 'lib/hexpm/oauth/tokens.ex'], 'collectionURL': 'https://hex.pm', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': "'Elixir.HexpmWeb.API.OAuthController':validate_scopes_against_key/2"}, {'name': "'Elixir.Hexpm.OAuth.Tokens':create_for_org/6"}]}, {'cpes': ['cpe:2.3:a:hexpm:hexpm:*:*:*:*:*:*:*:*'], 'repo': 'https://github.com/hexpm/hexpm', 'vendor': 'hexpm', 'modules': ["'Elixir.HexpmWeb.API.OAuthController'", "'Elixir.Hexpm.OAuth.Tokens'"], 'product': 'hexpm', 'versions': [{'status': 'affected', 'version': '71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b', 'lessThan': 'bf0fb9d208f0acfabf7a2f7467c8231659e322a8', 'versionType': 'git'}], 'packageURL': 'pkg:github/hexpm/hexpm', 'packageName': 'hexpm/hexpm', 'programFiles': ['lib/hexpm_web/controllers/api/oauth_controller.ex', 'lib/hexpm/oauth/tokens.ex'], 'collectionURL': 'https://github.com', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': "'Elixir.HexpmWeb.API.OAuthController':validate_scopes_against_key/2"}, {'name': "'Elixir.Hexpm.OAuth.Tokens':create_for_org/6"}]}] Added Description 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. Added CVSS V4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/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 Added CWE CWE-863 Added Reference https://cna.erlef.org/cves/CVE-2026-75542.html Added Reference https://github.com/hexpm/hexpm/commit/bf0fb9d208f0acfabf7a2f7467c8231659e322a8 Added Reference https://github.com/hexpm/hexpm/security/advisories/GHSA-rfx8-w654-8cpr Added Reference https://osv.dev/vulnerability/EEF-CVE-2026-75542