8.3high
OAuth token exchange grants repository scopes for organizations the principal cannot access
- Severity
- 8.3high CVSS:4.0 by EEF
- Exploit likelihood
- 0.54% (higher than 46% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- EEF
- Also known as
- EEF-CVE-2026-75542GHSA-rfx8-w654-8cpr
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; hexpm/hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| hex.pm | from 2025-10-18 before 2026-08-24 | CVE List |
| hexpm/hexpm | from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8 | CVE List |
| https://github.com/hexpm/hexpm | from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8 | Erlang Ecosystem Foundation |
All scores
| EEF | 8.3high CVSS:4.0 | 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 |
| Erlang Ecosystem Foundation | Not scored CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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; hexpm/hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8.
Erlang Ecosystem Foundation
Summary
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; hexpm/hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8.
NVD (es)
Vulnerabilidad de autorización incorrecta en el endpoint de token de OAuth en hexpm hexpm permite que una clave API que posee el permiso de repositorios lea los paquetes privados de otra organización. Cuando una clave API se intercambia por un token a través de la concesión client_credentials de OAuth, validate_scopes_against_key/2 en lib/hexpm_web/controllers/api/oauth_controller.ex admite un ámbito solicitado siempre que la clave posea el permiso de repositorios y la cadena de ámbito comience con repository:. El nombre de la organización nunca se resuelve contra el principal, y expand_repositories_scope/3 solo reescribe el ámbito literal de repositorios, por lo que un repository:<name> explícito pasa sin ser modificado. Ambos nodos perimetrales de CDN autorizan el acceso al repositorio a partir de la declaración del token sin consultar la base de datos, por lo que el token emitido es acceso de lectura a los paquetes privados de esa organización hasta que expire. Este problema afecta a hex.pm: desde el 18-10-2025 antes del 24-08-2026.
References
| https://github.com/hexpm/hexpm/security/advisories/GHSA-rfx8-w654-8cpr | advisory, exploit, related, vendor-advisory | |
| https://cna.erlef.org/cves/CVE-2026-75542.html | related, web | |
| https://osv.dev/vulnerability/EEF-CVE-2026-75542 | related | |
| https://github.com/hexpm/hexpm/commit/71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b | related, web | |
| https://github.com/hexpm/hexpm/commit/bf0fb9d208f0acfabf7a2f7467c8231659e322a8 | fix, patch | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-75542 changed 2026-11-20 | CVE Terms of Use |
| Erlang Ecosystem Foundation | EEF-CVE-2026-75542 changed 2026-11-25 | CC-BY-4.0 |
| NVD | CVE-2026-75542 changed 2026-11-20 | Public domain |