{"id":"CVE-2026-75542","aliases":["CVE-2026-75542","EEF-CVE-2026-75542","GHSA-rfx8-w654-8cpr"],"related":[],"kind":"vulnerability","state":"published","title":"OAuth token exchange grants repository scopes for organizations the principal cannot access","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.\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; hexpm/hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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; hexpm/hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nIncorrect 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; hexpm/hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8.","format":"markdown","source":"eef"},{"lang":"es","text":"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.\n\nCuando 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.\n\nEste problema afecta a hex.pm: desde el 18-10-2025 antes del 24-08-2026.","source":"nvd"}],"published":"2026-08-24T20:14:30.191Z","modified":"2026-11-25T06:30:08.939Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":8.3,"rating":"HIGH"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":8.3,"rating":"HIGH"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"type":"date","introduced":"2025-10-18","fixed":"2026-08-24","status":"affected"}],"vendor":"hexpm","product":"hexpm","package":"hex.pm","cpe":"cpe:2.3:a:hexpm:hexpm:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"git","introduced":"71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b","fixed":"bf0fb9d208f0acfabf7a2f7467c8231659e322a8","status":"affected"}],"vendor":"hexpm","product":"hexpm","package":"hexpm/hexpm","cpe":"cpe:2.3:a:hexpm:hexpm:*:*:*:*:*:*:*:*","repo":"https://github.com/hexpm/hexpm","source":"cvelist"},{"ranges":[{"type":"git","introduced":"71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b","status":"affected","fixed":"bf0fb9d208f0acfabf7a2f7467c8231659e322a8"}],"repo":"https://github.com/hexpm/hexpm","source":"eef"}],"references":[{"url":"https://github.com/hexpm/hexpm/security/advisories/GHSA-rfx8-w654-8cpr","tags":["advisory","exploit","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-75542.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-75542","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/hexpm/hexpm/commit/71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/hexpm/hexpm/commit/bf0fb9d208f0acfabf7a2f7467c8231659e322a8","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]}],"credits":["Eric Meadows-Jönsson","Jonatan Männchen / EEF"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-25T19:53:10.499Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-75542","url":"https://www.cve.org/CVERecord?id=CVE-2026-75542","licence":"CVE Terms of Use","modified":"2026-11-20T06:05:53.350Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-75542","url":"https://osv.dev/vulnerability/EEF-CVE-2026-75542","licence":"CC-BY-4.0","modified":"2026-11-25T06:30:08.939Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-75542","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-75542","licence":"Public domain","modified":"2026-11-20T06:17:40.393Z"}],"updatedAt":"2026-11-25T22:59:35.074Z","epss":{"score":0.00542,"percentile":0.46975,"date":"2026-12-01T12:00:22.000Z"}}