{"containers":{"cna":{"affected":[{"collectionURL":"https://hex.pm","cpes":["cpe:2.3:a:hexpm:hexpm:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.HexpmWeb.API.OAuthController'","'Elixir.Hexpm.OAuth.Tokens'"],"packageName":"hex.pm","product":"hexpm","programFiles":["lib/hexpm_web/controllers/api/oauth_controller.ex","lib/hexpm/oauth/tokens.ex"],"programRoutines":[{"name":"'Elixir.HexpmWeb.API.OAuthController':validate_scopes_against_key/2"},{"name":"'Elixir.Hexpm.OAuth.Tokens':create_for_org/6"}],"vendor":"hexpm","versions":[{"lessThan":"2026-08-24","status":"affected","version":"2025-10-18","versionType":"date"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:hexpm:hexpm:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.HexpmWeb.API.OAuthController'","'Elixir.Hexpm.OAuth.Tokens'"],"packageName":"hexpm/hexpm","packageURL":"pkg:github/hexpm/hexpm","product":"hexpm","programFiles":["lib/hexpm_web/controllers/api/oauth_controller.ex","lib/hexpm/oauth/tokens.ex"],"programRoutines":[{"name":"'Elixir.HexpmWeb.API.OAuthController':validate_scopes_against_key/2"},{"name":"'Elixir.Hexpm.OAuth.Tokens':create_for_org/6"}],"repo":"https://github.com/hexpm/hexpm","vendor":"hexpm","versions":[{"lessThan":"bf0fb9d208f0acfabf7a2f7467c8231659e322a8","status":"affected","version":"71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b","versionType":"git"}]}],"credits":[{"lang":"en","type":"finder","value":"Eric Meadows-Jönsson"},{"lang":"en","type":"remediation developer","value":"Eric Meadows-Jönsson"},{"lang":"en","type":"coordinator","value":"Jonatan Männchen / EEF"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Incorrect Authorization vulnerability in the OAuth token endpoint in hexpm hexpm allows an API key holding the <code>repositories</code> permission to read another organization's private packages.</p>\n<p>When an API key is exchanged for a token through the OAuth <code>client_credentials</code> grant, <code>validate_scopes_against_key/2</code> in <code>lib/hexpm_web/controllers/api/oauth_controller.ex</code> admits a requested scope whenever the key carries the <code>repositories</code> permission and the scope string begins with <code>repository:</code>. The organization name is never resolved against the principal, and <code>expand_repositories_scope/3</code> only rewrites the literal <code>repositories</code> scope, so an explicit <code>repository:&lt;name&gt;</code> 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.</p>\n<p>This issue affects hex.pm: from 2025-10-18 before 2026-08-24.</p>"},{"base64":false,"type":"text/markdown","value":"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.\n\nWhen 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.\n\nThis issue affects hex.pm: from 2025-10-18 before 2026-08-24."}],"value":"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.\n\nWhen 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.\n\nThis issue affects hex.pm: from 2025-10-18 before 2026-08-24."}],"impacts":[{"capecId":"CAPEC-122","descriptions":[{"lang":"en","value":"CAPEC-122 Privilege Abuse"}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":8.3,"baseSeverity":"HIGH","privilegesRequired":"LOW","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"HIGH","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-863","description":"CWE-863 Incorrect Authorization","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-08-24T20:14:30.191Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"tags":["vendor-advisory","related"],"url":"https://github.com/hexpm/hexpm/security/advisories/GHSA-rfx8-w654-8cpr"},{"tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-75542.html"},{"tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-75542"},{"tags":["patch"],"url":"https://github.com/hexpm/hexpm/commit/bf0fb9d208f0acfabf7a2f7467c8231659e322a8"}],"source":{"discovery":"INTERNAL"},"title":"OAuth token exchange grants repository scopes for organizations the principal cannot access"}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-75542","datePublished":"2026-08-24T20:14:30.191Z","dateReserved":"2026-08-18T11:00:02.414Z","dateUpdated":"2026-08-24T20:14:30.191Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"}