# CVE-2026-75542: OAuth token exchange grants repository scopes for organizations the principal cannot access

- Severity: High 8.3 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.54%, higher than 46% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-24T20:14:30.191Z
- Modified: 2026-11-25T06:30:08.939Z
- Also known as: EEF-CVE-2026-75542, GHSA-rfx8-w654-8cpr
- Weaknesses: CWE-863
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: EEF

## 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.

(As written by CVE List.)

## Affected

- hex.pm: from 2025-10-18 before 2026-08-24
- hexpm/hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8
- https://github.com/hexpm/hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before bf0fb9d208f0acfabf7a2f7467c8231659e322a8

## Every score

- EEF: CVSS:4.0 8.3 High `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: 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`

## References

- <https://github.com/hexpm/hexpm/security/advisories/GHSA-rfx8-w654-8cpr> (exploit, advisory, 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

- CVE List: [CVE-2026-75542](https://www.cve.org/CVERecord?id=CVE-2026-75542), CVE Terms of Use, modified 2026-11-20
- Erlang Ecosystem Foundation: [EEF-CVE-2026-75542](https://osv.dev/vulnerability/EEF-CVE-2026-75542), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-75542](https://nvd.nist.gov/vuln/detail/CVE-2026-75542), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-75542 · Whole record: https://cve.day/CVE-2026-75542.json · Rebuilt by cve.day 2026-11-25T22:59:35.074Z
