Ruby/doorkeeper/5.0.0
Doorkeeper is an OAuth 2 provider for Rails and Grape.
https://rubygems.org/gems/doorkeeper
MIT
7 Security Vulnerabilities
Doorkeeper Improper Authentication vulnerability
- https://github.com/doorkeeper-gem/doorkeeper/security/advisories/GHSA-7w2c-w47h-789w
- https://nvd.nist.gov/vuln/detail/CVE-2023-34246
- https://github.com/doorkeeper-gem/doorkeeper/issues/1589
- https://github.com/doorkeeper-gem/doorkeeper/pull/1646
- https://github.com/doorkeeper-gem/doorkeeper/releases/tag/v5.6.6
- https://www.rfc-editor.org/rfc/rfc8252#section-8.6
- https://github.com/advisories/GHSA-7w2c-w47h-789w
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/doorkeeper/CVE-2023-34246.yml
- https://lists.debian.org/debian-lts-announce/2023/07/msg00016.html
- https://lists.debian.org/debian-lts-announce/2024/12/msg00010.html
OAuth RFC 8252 says https://www.rfc-editor.org/rfc/rfc8252#section-8.6
the authorization server SHOULD NOT process authorization requests automatically without user consent or interaction, except when the identity of the client can be assured. This includes the case where the user has previously approved an authorization request for a given client id
But Doorkeeper automatically processes authorization requests without user consent for public clients that have been previously approved. Public clients are inherently vulnerable to impersonation, their identity cannot be assured.
Issue https://github.com/doorkeeper-gem/doorkeeper/issues/1589
Doorkeeper: When using public clients, any client can revoke any access token
- https://github.com/doorkeeper-gem/doorkeeper/security/advisories/GHSA-h5m9-42h9-vcq6
- https://nvd.nist.gov/vuln/detail/CVE-2026-115472
- https://github.com/doorkeeper-gem/doorkeeper/pull/1808
- https://github.com/doorkeeper-gem/doorkeeper/commit/ecc1599ed762a9002c3e04729113eff0d562f4b4
- https://github.com/doorkeeper-gem/doorkeeper/releases/tag/v5.9.1
- https://github.com/advisories/GHSA-h5m9-42h9-vcq6
Summary
An improper authorization issue affects Doorkeeper's OAuth token revocation flow when public (non-confidential) clients are in use. This vulnerability can lead to tokens being revoked without correct authorization. The issue is fixed in Doorkeeper 5.9.1.
Exposure of Sensitive Information to an Unauthorized Actor in Doorkeeper
- https://github.com/doorkeeper-gem/doorkeeper/security/advisories/GHSA-j7vx-8mqj-cqp9
- https://nvd.nist.gov/vuln/detail/CVE-2020-10187
- https://github.com/advisories/GHSA-j7vx-8mqj-cqp9
- https://github.com/rubysec/ruby-advisory-db/pull/446
- https://github.com/doorkeeper-gem/doorkeeper/commit/25d038022c2fcad45af5b73f9d003cf38ff491f6
- https://github.com/doorkeeper-gem/doorkeeper/releases
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/doorkeeper/CVE-2020-10187.yml
Impact
Information disclosure vulnerability. Allows an attacker to see all Doorkeeper::Application model attribute values (including secrets) using authorized applications controller if it's enabled (GET /oauth/authorized_applications.json).
Patches
These versions have the fix:
- 5.0.3
- 5.1.1
- 5.2.5
- 5.3.2
Workarounds
Patch Doorkeeper::Application model #as_json(options = {}) method and define only those attributes you want to expose.
Additional recommended hardening is to enable application secrets hashing (guide), available since Doorkeeper 5.1. This would render the exposed secret useless.
References
Doorkeeper Improper Authentication vulnerability
OAuth RFC 8252 says https://www.rfc-editor.org/rfc/rfc8252#section-8.6
the authorization server SHOULD NOT process authorization requests automatically without user consent or interaction, except when the identity of the client can be assured. This includes the case where the user has previously approved an authorization request for a given client id
But Doorkeeper automatically processes authorization requests without user consent for public clients that have been previous approved. Public clients are inherently vulnerable to impersonation, their identity cannot be assured.
Issue https://github.com/doorkeeper-gem/doorkeeper/issues/1589
Fix https://github.com/doorkeeper-gem/doorkeeper/pull/1646
Doorkeeper - When using public clients, any client can revoke any access token
An improper authorization issue affects Doorkeeper's OAuth token revocation flow when public (non-confidential) clients are in use. This vulnerability can lead to tokens being revoked without correct authorization. The issue is fixed in Doorkeeper 5.9.1.
Open redirect in the authorization endpoint's deny path
DELETE /oauth/authorize (the deny
action of Doorkeeper::AuthorizationsController) builds and sends its accessdenied error response without validating clientid, redirecturi or responsetype first. An authenticated resource owner can therefore be redirected — or formpost-submitted — to an arbitrary, unregistered URI supplied in then request, and a missing redirecturi raises an unhandled exception (HTTP 500).
Authorized-applications endpoints act on a nil resource owner
Doorkeeper::AuthorizedApplicationsController guards its actions with beforeaction :authenticateresourceowner!, but that helper merely evaluates the configured resourceownerauthenticator and ignores its return value. When the authenticator returns nil without halting the request — which is what Doorkeeper's own default authenticator does — the actions proceed with currentresourceowner == nil. Since nil matches every record whose resourceownerid is NULL, an unauthenticated caller can list and revoke all clientcredentials tokens issued by the server.
138 Other Versions
| Version | License | Security | Released | |
|---|---|---|---|---|
| 5.2.2 | MIT | 7 | 2019-11-10 - 10:17 | about 7 years |
| 5.2.1 | MIT | 7 | 2019-09-17 - 13:32 | about 7 years |
| 5.2.0 | MIT | 7 | 2019-09-16 - 08:31 | about 7 years |
| 5.2.0.rc3 | MIT | 6 | 2019-08-28 - 07:35 | over 7 years |
| 5.2.0.rc2 | MIT | 6 | 2019-06-17 - 08:27 | over 7 years |
| 5.2.0.rc1 | MIT | 6 | 2019-05-23 - 15:17 | over 7 years |
| 5.1.2 | MIT | 6 | 2020-10-19 - 07:54 | about 6 years |
| 5.1.1 | MIT | 6 | 2020-05-02 - 13:38 | over 6 years |
| 5.1.0 | MIT | 7 | 2019-04-17 - 14:35 | over 7 years |
| 5.1.0.rc2 | MIT | 6 | 2019-03-22 - 07:49 | over 7 years |
| 5.1.0.rc1 | MIT | 6 | 2019-01-17 - 08:41 | almost 8 years |
| 5.0.3 | MIT | 6 | 2020-05-05 - 08:43 | over 6 years |
| 5.0.2 | MIT | 7 | 2018-10-25 - 09:25 | about 8 years |
| 5.0.1 | MIT | 7 | 2018-10-10 - 14:08 | about 8 years |
| 5.0.0 | MIT | 7 | 2018-08-24 - 13:55 | over 8 years |
| 5.0.0.rc2 | MIT | 6 | 2018-07-17 - 10:01 | over 8 years |
| 5.0.0.rc1 | MIT | 5 | 2018-06-11 - 11:42 | over 8 years |
| 4.4.3 | MIT | 5 | 2018-09-19 - 08:41 | about 8 years |
| 4.4.2 | MIT | 5 | 2018-08-20 - 15:24 | over 8 years |
| 4.4.1 | MIT | 5 | 2018-07-27 - 14:58 | over 8 years |
| 4.4.0 | MIT | 5 | 2018-07-17 - 09:57 | over 8 years |
| 4.3.2 | MIT | 7 | 2018-03-28 - 09:49 | over 8 years |
| 4.3.1 | MIT | 7 | 2018-03-03 - 09:44 | over 8 years |
| 4.3.0 | MIT | 7 | 2018-02-23 - 15:06 | almost 9 years |
| 4.2.6 | MIT | 7 | 2017-05-26 - 00:08 | over 9 years |
| 4.2.5 | MIT | 9 | 2017-02-12 - 16:09 | almost 10 years |
| 4.2.0 | MIT | 9 | 2016-08-18 - 21:15 | over 10 years |
| 4.1.0 | MIT | 10 | 2016-07-29 - 23:09 | over 10 years |
| 4.0.0 | MIT | 10 | 2016-07-01 - 21:31 | over 10 years |
| 4.0.0.rc4 | MIT | 10 | 2016-05-17 - 18:14 | over 10 years |
| 4.0.0.rc3 | MIT | 10 | 2016-04-20 - 22:23 | over 10 years |
| 4.0.0.rc2 | MIT | 10 | 2016-03-03 - 01:56 | over 10 years |
| 4.0.0.rc1 | MIT | 10 | 2016-02-26 - 03:36 | almost 11 years |
| 3.1.0 | MIT | 10 | 2015-12-23 - 18:14 | almost 11 years |
| 3.0.1 | MIT | 10 | 2015-09-24 - 03:49 | about 11 years |
| 3.0.0 | MIT | 10 | 2015-07-30 - 19:09 | over 11 years |
| 3.0.0.rc2 | MIT | 10 | 2015-07-09 - 22:32 | over 11 years |
| 3.0.0.rc1 | MIT | 10 | 2015-05-12 - 03:18 | over 11 years |
| 2.2.2 | MIT | 10 | 2015-07-30 - 19:15 | over 11 years |
| 2.2.1 | MIT | 10 | 2015-05-05 - 02:12 | over 11 years |
| 2.2.0 | MIT | 10 | 2015-04-19 - 12:54 | over 11 years |
| 2.1.4 | MIT | 10 | 2015-03-27 - 16:14 | over 11 years |
| 2.1.3 | MIT | 10 | 2015-03-01 - 22:34 | almost 12 years |
| 2.1.2 | MIT | 10 | 2015-02-26 - 02:39 | almost 12 years |
| 2.1.1 | MIT | 11 | 2015-02-06 - 16:12 | almost 12 years |
| 2.1.0 | MIT | 11 | 2015-01-13 - 20:40 | almost 12 years |
| 2.0.1 | MIT | 9 | 2014-12-17 - 19:44 | almost 12 years |
| 2.0.0 | MIT | 9 | 2014-12-16 - 21:03 | almost 12 years |
| 2.0.0.rc3 | MIT | 10 | 2014-12-14 - 16:59 | almost 12 years |
| 2.0.0.rc2 | MIT | 10 | 2014-12-09 - 13:18 | almost 12 years |
