API privilege escalation via ignored resource qualifier
Published Mar 5, 2026 · Updated Mar 5, 2026
Incorrect authorization in Hex.pm before 2026-03-05 allows remote authenticated users to obtain full API write access through OAuth. validate_scopes_against_key/2 treats every api-domain permission as the broad api scope, ignoring the read resource qualifier during client_credentials exchange. Exploitation requires a victim's read-only API key and valid TOTP code, after which an unrestricted API key can publish, retire, or modify packages.
Summary
What happened
Incorrect authorization in Hex.pm before 2026-03-05 allows remote authenticated users to obtain full API write access through OAuth. validate_scopes_against_key/2 treats every api-domain permission as the broad api scope, ignoring the read resource qualifier during client_credentials exchange. Exploitation requires a victim's read-only API key and valid TOTP code, after which an unrestricted API key can publish, retire, or modify packages.
The record
- CVE
- CVE-2026-21621
- Published
- Mar 5, 2026
- Updated
- Mar 5, 2026
- Vendor
- Six Colors AB
- Product
- Hex.pm
- Classifications
- CWE-863, T1098
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Mar 5, 2026CVE publishedPublication date reported by the CVE source.
- Mar 5, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=2025-08-18 <2026-03-05
- Affected versionversion=71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b <71c127afebb7ed7cc637eb231b98feb802d62999
- Affected versionversion=pkg:github/hexpm/hexpm@71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b <pkg:github/hexpm/hexpm@71c127afebb7ed7cc637eb231b98feb802d62999
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo