llamaCVEVulnerability Intelligence
/
Advisory · GitHub · RubyGems · doorkeeper

GHSA-C62J-746X-GFCR

Access token authentication silently accepts multiple simultaneous transmission methods (RFC 6750 §2)

Parche disponible
Descargar PNG JSON
CVSS 3.1
4.8
Media
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -41 d de la divulgación
Exposición29 dDesde la divulgación, 21 oct 2026, 3:53 a. m.
Detección28 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 6.0.0.rc1
Monitoreo
Detectada +1
10 sept 26
21 oct 26
18 nov 26
20 nov 26
10 sept 26
28 sept 26
15 oct 26
2 nov 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche 6.0.0.rc1 doorkeeper · -41 d desde divulgación
Divulgación Publicada GHSA-C62J-746X-GFCR divulgada · CVSS 4.8 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Impact

Doorkeeper accepts an access token through three transmission methods — the `Authorization: Bearer` header, a form-encoded body parameter, and a URI query parameter (`access_token` / `bearer_token`) — as configured by `access_token_methods`. RFC 6750 §2 requires that a client "MUST NOT use more than one method to transmit the token in each request", and §3.1 requires a resource server to answer such a request with `invalid_request`.

Doorkeeper instead authorized the request with the first configured method that yielded a token and silently discarded every other token presented in the same request. Which token authorizes the request was therefore decided by the server's configured method order, not by what the caller sent, and the form-encoded body and the URI query were never told apart at all, because both Rails and Rack merge them into a single parameter hash before Doorkeeper reads it (Rails lets the query win, Rack lets the body win).

This affects every resource protected with `doorkeeper_authorize!` (Rails and Grape, and controllers built on Doorkeeper's own base classes), `GET /oauth/token/info`, and the bearer-token authorization path of `POST /oauth/introspect`.

Two consequences:

  1. Confused deputy. A gateway or service mesh that attaches its own `Authorization: Bearer` while forwarding a caller-controlled `access_token` parameter runs the request under the gateway's identity; the caller's token is discarded without any error or log entry. Attribution, rate limiting and `resource_owner_id` resolution are then wrong.
  2. Layer desync. A WAF, gateway or custom middleware that inspects one transmission method while Doorkeeper authorizes on another reaches a different verdict about the same request: a request that passed a scope check on one token executes under another.

No privilege beyond holding the presented tokens is needed, and the impact depends on a proxy/gateway topology in front of Doorkeeper, which is why the severity is Medium.

Details

Measured on v5.9.6 with two access tokens for two different applications and two different resource owners, default `access_token_methods`:

| Request | Result |
| --- | --- |
| `Authorization: Bearer <A>` + `?access_token=<B>` | 200 — served under A, B discarded |
| `?access_token=<A>&bearer_token=<B>` | 200 — served under A, B discarded |
| `Authorization: Bearer <revoked B>` + `?access_token=<valid A>` | 401 — the valid token is discarded |
| same request as row 1 with `access_token_methods` order reversed | 403 — now the parameter wins |
| `POST` with `access_token=<A>` in the body and `?access_token=<B>` in the query | 200 — served under B on Rails, under A on Grape |

Patches

The fix counts how many transmission methods carry a token and refuses the request when there is more than one. Only the built-in extraction methods take part in the check; a custom callable configured in `access_token_methods` keeps the historical first-wins behaviour, mirroring the exemption client authentication gives its legacy callable extractors.

  • 6.0.0 refuses such a request with the `invalid_request` (HTTP 400) response RFC 6750 §3.1 prescribes, at every affected surface. The body and the query count as two methods, and the same token repeated across two methods is refused as well. `Doorkeeper.authenticate` and the `doorkeeper_token` helpers keep their token-or-nil contract; under `handle_auth_errors :raise` the request raises `Doorkeeper::Errors::InvalidRequest` (a sibling of `Doorkeeper::Errors::InvalidToken`, not a subclass). A new `doorkeeper_bad_request_render_options` controller hook customizes the 400 body. See the 6.0.0 CHANGELOG and upgrade guide.
  • 5.9.7 fails closed instead: a request that transmits different tokens by more than one method is treated as carrying no usable token and answered `invalid_token` (HTTP 401), with no change to any public method's contract. The stricter `invalid_request` answer is 6.0-only.
Workarounds

If you cannot upgrade, reduce `access_token_methods` to a single method (for example `access_token_methods :from_bearer_authorization`) so that only one transmission method is read, and make any gateway, WAF or middleware in front of Doorkeeper read the same one. Note that this does not detect the body/query collision for the parameter methods; only upgrading does.

References
  • RFC 6750 §2 (transmission methods), §2.2 / §2.3 (form body and URI query), §3.1 (`invalid_request`)
  • GHSA-c8r6-23w7-5q9p — the same first-wins shape on the client authentication side (RFC 6749 §2.3)
Vector CVSS 3.1

Desglose de métricas

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

Rangos afectados

Afectada Corregida Última
doorkeeper≤ 5.9.6
doorkeeper≥ 6.0.0.beta1 ≤ 6.0.0.beta2
5.9.6
5.9.9
6.0.0.beta1
6.0.0.beta2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
rubygemsdoorkeeper
Corregida 6.0.0.rc1 -41 d 5.9.9 no afectada
Versiones corregidas6.0.0.rc1
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/doorkeeper-gem/doorkeeper/security/advisories/GHSA-c62j-746x-gfcr

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