llamaCVEVulnerability Intelligence
/
hexpm

CVE-2026-21621

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

Parche disponible
Descargar PNG JSON
CVSS 4.0
7.0
Alta
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 Fuente: CNA
5.3NVD · CVSS 3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
ExplotaciónSin evidenciaSSVC: none · no figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión2026-03-05
Exposición258 dDesde la divulgación, 5 mar 2026, 2:20 p. m.
Detección242 dDesde la divulgación hasta su ingreso al índice
Decisión SSVCSeguir
Remediar en la ventana regular de mantenimiento
Sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Evaluación SSVC
Modificada
Explotación
Remediación
Monitoreo
Detectada
Verificada
5 mar 26
6 mar 26
6 abr 26
3 nov 26
13 nov 26
19 nov 26
5 mar 26
9 may 26
13 jul 26
15 sept 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada CVE-2026-21621 divulgada · CVSS 7 (CNA)
Divulgación Evaluación SSVC CISA-ADP · explotación ninguna
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen

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.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · NVD
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
hex.pm≥ 2025-08-18 < 2026-03-05
2025-08-18
2026-03-05
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
hexpm
Corregida 2026-03-05 — —
Versiones corregidas2026-03-05
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Fabricantehttps://github.com/hexpm/hexpm/security/advisories/GHSA-739m-8727-j6w3
Parchehttps://github.com/hexpm/hexpm/commit/71c127afebb7ed7cc637eb231b98feb802d62999
Otrahttps://cna.erlef.org/cves/CVE-2026-21621.html
Otrahttps://osv.dev/vulnerability/EEF-CVE-2026-21621

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.