Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-21621— Improper Scope Enforcement in OAuth client_credentials Flow Allows Read-Only API Key to Escalate to Full Access

Quick assessment

Affected
hexpm hexpm
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Hexpm是Hex开源的一个Web页面和接口。 Hexpm存在安全漏洞,该漏洞源于授权不当,可能导致权限提升。

AI Predicted 8.8 Difficulty: Hard EPSS 0.34% · P25

Possible ATT&CK Techniques 1 AI

T1078.004 · Cloud Accounts
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-21621

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Improper Scope Enforcement in OAuth client_credentials Flow Allows Read-Only API Key to Escalate to Full Access
Source: CVE Program / CVE List V5
Vulnerability Description
Incorrect Authorization vulnerability in hexpm hexpm/hexpm ('Elixir.HexpmWeb.API.OAuthController' module) allows Privilege Escalation. An API key created with read-only permissions (domain: "api", resource: "read") can be escalated to full write access under specific conditions. When exchanging a read-only API key via the OAuth client_credentials grant, the resource qualifier is ignored. The resulting JWT receives the broad "api" scope instead of the expected "api:read" scope. This token is therefore treated as having full API access. If an attacker is able to obtain a victim's read-only API key and a valid 2FA (TOTP) code for the victim account, they can use the incorrectly scoped JWT to create a new full-access API key with unrestricted API permissions that does not expire by default and can perform write operations such as publishing, retiring, or modifying packages. This vulnerability is associated with program files lib/hexpm_web/controllers/api/oauth_controller.ex and program routines 'Elixir.HexpmWeb.API.OAuthController':validate_scopes_against_key/2. This issue affects hexpm: from 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b before 71c127afebb7ed7cc637eb231b98feb802d62999.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:H/SA:N
Source: CVE Program / CVE List V5
Vulnerability Type
授权机制不正确
Source: CVE Program / CVE List V5
Vulnerability Title
Hexpm 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Hexpm是Hex开源的一个Web页面和接口。 Hexpm存在安全漏洞,该漏洞源于授权不当,可能导致权限提升。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
hexpm hexpm 71829cb6f6559bcceb1ef4e43a2fb8cdd3af654b ~ 71c127afebb7ed7cc637eb231b98feb802d62999 cpe:2.3:a:hexpm:hexpm:*:*:*:*:*:*:*:*
hexpm hex.pm 2025-08-18 ~ 2026-03-05 -

II. Public POCs for CVE-2026-21621

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-21621

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-21621 (1)

Vendor Advisories for CVE-2026-21621 (3)

IV. Related Vulnerabilities

V. Comments for CVE-2026-21621

No comments yet


Leave a comment