GHSA-C8R6-23W7-5Q9P
Client authentication silently accepts multiple simultaneous methods (RFC 6749 §2.3)
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 5.9.5 | doorkeeper · -75 d desde divulgación | |
| Divulgación | Publicada | GHSA-C8R6-23W7-5Q9P divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Vulnerability Details
File: `lib/doorkeeper/oauth/client/credentials.rb`
Line: 9-14 (`Client::Credentials.from_request`)
Affected component: Client authentication, used by `POST /oauth/token`, `POST /oauth/revoke`, and `POST /oauth/introspect`
CWE: CWE-287 — Improper Authentication
Severity: Low
CVSS: 4.0 — CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Root Cause
RFC 6749 §2.3 states: "The client MUST NOT use more than one authentication
method in each request." `Client::Credentials.from_request` does not enforce
this:
Credentials = Struct.new(:uid, :secret) do
class << self
def from_request(request, *credentials_methods)
credentials_methods.inject(nil) do |_, method|
method = self.method(method) if method.is_a?(Symbol)
credentials = Credentials.new(*method.call(request))
break credentials if credentials.present?
end
end
...With the default `client_credentials_methods` of `%i[from_basic from_params]`
(`lib/doorkeeper/config.rb:600`), this walks extraction methods in order and
simply returns the first one that yields non-blank credentials — any
other credentials present in the same request are silently discarded with no
error, warning, or log entry.
Attack Scenario
- A request to `POST /oauth/token` (or `/oauth/revoke`, `/oauth/introspect`)
- Doorkeeper authenticates the request as client A (Basic auth is checked
- This matters most in integration patterns where a gateway/proxy layer
Dynamically Confirmed (v5.9.3, spec/dummy Rails app)
Registered two confidential OAuth applications (Client A, Client B), then:
curl -u "<Client A uid>:<Client A secret>" -X POST http://localhost:3099/oauth/token \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "client_id=<Client B uid>" \
--data-urlencode "client_secret=<Client B secret>"Result: `HTTP 200`, access token issued. Inspecting the token server-side
confirmed `token.application_id` belonged to Client A (the Basic-auth
identity) — Client B's complete, valid credentials in the body were silently
discarded with no error.
Impact
- Type: CWE-287 — Improper Authentication (RFC 6749 §2.3 violation)
- Auth required: No additional privilege beyond having valid credentials
- Consequence: Ambiguous/incorrect client identity resolution with no
Vulnerable Code
def from_request(request, *credentials_methods)
credentials_methods.inject(nil) do |_, method|
method = self.method(method) if method.is_a?(Symbol)
credentials = Credentials.new(*method.call(request))
break credentials if credentials.present?
end
endRecommended Fix
def from_request(request, *credentials_methods)
matches = credentials_methods.filter_map do |method|
method = self.method(method) if method.is_a?(Symbol)
credentials = Credentials.new(*method.call(request))
credentials if credentials.present?
end
raise Errors::DoorkeeperError, "multiple client authentication methods" if matches.size > 1
matches.first
endNote: this exact defect class was already identified and fixed by the
maintainers in the *unreleased* 6.0 client-authentication registry (commit
`4289785e`, "Reject requests using multiple client authentication methods
(RFC 6749 §2.3)"). That fix applies to the new registry-based mechanism
introduced during 6.0 development and does not cover the `Client::Credentials`
path used by every currently released version (including the latest stable
5.9.3), since that file does not exist on `main` anymore. This report
requests the equivalent fix be applied to the maintenance branch(es) serving
currently released versions.
### Verification
Dynamically confirmed on v5.9.3 in a local Rails lab (spec/dummy app,
Puma, Ruby 3.3.8) on 2026-08-01 — see reproduction steps above.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
rubygemsdoorkeeper |
Corregida | 5.9.5 | -75 d | 5.9.9 no afectada |
5.9.5Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/doorkeeper-gem/doorkeeper/security/advisories/GHSA-c8r6-23w7-5q9pLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
