hexpm hex.pm oauth_controller.ex authorization

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.2$0-$5k0.00

Summaryinfo

A vulnerability classified as problematic has been found in hexpm hex.pm. This issue affects some unknown processing in the library lib/hexpm_web/controllers/api/oauth_controller.ex. This manipulation causes authorization. This vulnerability appears as CVE-2026-21621. The attack may be initiated remotely. There is no available exploit. To fix this issue, it is recommended to deploy a patch.

Detailsinfo

A vulnerability was found in hexpm hex.pm (version now known). It has been declared as problematic. Affected by this vulnerability is some unknown processing in the library lib/hexpm_web/controllers/api/oauth_controller.ex. The manipulation with an unknown input leads to a authorization vulnerability. The CWE definition for the vulnerability is CWE-863. The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. As an impact it is known to affect integrity, and availability. The summary by CVE is:

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.

The weakness was presented by Michael Lubas. It is possible to read the advisory at github.com. This vulnerability is known as CVE-2026-21621 since 01/01/2026. The exploitation appears to be easy. The attack can be launched remotely. Technical details of the vulnerability are known, but there is no available exploit.

Applying the patch 71c127afebb7ed7cc637eb231b98feb802d62999/pkg:github/hexpm/hexpm@71c127afebb7ed7cc637eb231b98feb802d62999 is able to eliminate this problem.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Productinfo

Vendor

Name

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒

CVSSv3info

VulDB Meta Base Score: 5.4
VulDB Meta Temp Score: 5.2

VulDB Base Score: 5.4
VulDB Temp Score: 5.2
VulDB Vector: 🔒
VulDB Reliability: 🔍

NVD Base Score: 5.3
NVD Vector: 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Authorization
CWE: CWE-863 / CWE-285 / CWE-266
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Yes

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Patch
Status: 🔍

0-Day Time: 🔒

Patch: 71c127afebb7ed7cc637eb231b98feb802d62999/pkg:github/hexpm/hexpm@71c127afebb7ed7cc637eb231b98feb802d62999

Timelineinfo

01/01/2026 CVE reserved
03/05/2026 +63 days Advisory disclosed
03/05/2026 +0 days VulDB entry created
03/25/2026 +20 days VulDB entry last update

Sourcesinfo

Advisory: github.com
Researcher: Michael Lubas
Status: Confirmed

CVE: CVE-2026-21621 (🔒)
GCVE (CVE): GCVE-0-2026-21621
GCVE (VulDB): GCVE-100-349243

Entryinfo

Created: 03/05/2026 20:48
Updated: 03/25/2026 04:03
Changes: 03/05/2026 20:48 (66), 03/09/2026 14:42 (1), 03/25/2026 04:03 (9)
Complete: 🔍
Cache ID: 216::103

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to know what is going to be exploited?

We predict KEV entries!