Skip to content
Putting technology to work.
Insights to guide decisions and action.

Search articles

Doorkeeper 5.9.1: another app could revoke tokens

Table of contents · 6 items

To let users log in to your web service from mobile apps, SPAs or external tools, some setups place an OAuth authorization server inside a Rails app. Doorkeeper is one of the gems for this. Issued tokens are cancelled when the app sends a revocation request (RFC 7009 revoke) at logout. This revocation check was too lax under certain conditions.

On November 19, 2026, an issue in Doorkeeper's revocation handling (GHSA-h5m9-42h9-vcq6, CVE-2026-115472, MODERATE, 6.5 on CVSS 3.1) was added to GitHub's advisory database. In the developers' repository, it was published as an advisory on July 30. Versions below 5.9.1 are affected, and 5.9.1 was released on RubyGems on May 19. However, the developers have since issued five more advisories in October and November, so the upgrade target is 5.9.10, released on November 23. Based on the fix commit and the changelog, this article sorts out what was possible and what changes with the upgrade.

What was possible

OAuth clients are either 'confidential clients', which can hold a secret securely (such as web apps running on a server), or 'public clients', which cannot (such as mobile apps and SPAs running in the browser). According to comments in Doorkeeper's code, a revocation request carries a valid client_id for public clients, or the client credentials for confidential clients. Because public clients have no secret, a request goes through with just the ID.

According to the message of the fix commit (ecc1599, March 31, 2026), authorized?, which checks the token's owner in revocation requests, only checked whether the requesting client matched the client the token was issued to when the token belonged to a confidential client. As a result, tokens issued to public clients could be revoked even by a request carrying the ID of a different valid client.

# 修正前
if token.application_id? && token.application.confidential?
# 修正後(5.9.1)
if token.application_id?

To revoke a token, you need to know the token string itself. So it is not possible to revoke unknown tokens one after another from outside. In the editorial team's assessment, the possible impact is something like another client that has obtained a token somehow (such as a different app registered with the same authorization server) forcibly logging out users of the legitimate app. The advisory rates the severity as MODERATE and does not describe a detailed attack scenario.

Comparison before and after the fix of the condition that matches the token's issued-to client against the requesting client in Doorkeeper revocation requests. Up to 5.9.0, only tokens of confidential clients were checked, and tokens of public clients could be revoked with another client's ID. From 5.9.1, all tokens with an issued-to client are checked, and a different client gets 403 unauthorized_client. Tokens without an issued-to client are still not checked, as before

What changes with the upgrade

In 5.9.1, every token that has an issued-to client is checked against the requesting client. In the added tests, trying to revoke a public client's token with another public client's ID returns 403 (unauthorized_client), and the token is not revoked. With the ID of the same client the token was issued to, both access tokens and refresh tokens can be revoked.

Before upgrading, check that your apps' revocation requests carry the correct client_id. For example, if you registered the iOS and Android apps for one service as separate clients but the logout process sends a shared client ID, revocation requests will be rejected with 403 after the upgrade. The app will show that the user has logged out, but the token on the server will remain valid until it expires.

As the code comments note, tokens without an issued-to client (with an empty application_id) can still be revoked without any client check after the fix. The 5.9.1 changelog also says that, besides this fix, colons were removed from the user-facing view templates and moved into the translation strings, and that you need to check this if you have customized the views.

Advisories issued after 5.9.1, and changes in 5.9.10

The following five advisories were published in the developers' repository in October and November. As of November 24, none of the five had been added to GitHub's advisory database.

Advisory (publication date)SeverityDetails (summary of the advisory)Fixed versions
GHSA-q735-3ffp-vv6j (October 27)MODERATEWith a configuration where resource_owner_authenticator returns nil without halting processing, tokens without a user (issued via client_credentials) can be listed and revoked without authentication5.9.9
GHSA-86wh-7qgj-4px7 (October 27)MODERATEThe authorization denial path does not check the client or redirect_uri, so logged-in users can be redirected to unregistered URLs5.9.9
GHSA-v7p7-787j-8hcm (November 23)MODERATEURLs such as javascript: can be registered as redirect targets, and response_mode=form_post runs scripts on the authorization server's pages. Affects 5.5.0 and later when untrusted parties are allowed to register apps and forbid_redirect_uri is not configured5.9.9
GHSA-c62j-746x-gfcr (October 21)MODERATERequests that sent the access token by more than one method were accepted5.9.7
GHSA-c8r6-23w7-5q9p (October 21)LOWRequests that sent client authentication by more than one method were accepted5.9.6

The first is, like this issue, a problem that lets tokens be revoked. According to the advisory, you are not affected if you keep the generated default configuration file as is (raising an exception or redirecting as in the example). You are affected if you removed the resource_owner_authenticator setting and left it to the default handling (logging a warning and returning nil), or if you wrote your own handling that returns nil to users who are not logged in. The advisory points out that setups used only for server-to-server integration (client_credentials) are likely to remove this setting.

The changelog for 5.9.10 on November 23 includes two further fixes.

  • An issue where, with the setting that revokes refresh tokens on each use, a replaced old refresh token could sometimes remain usable (GHSA-88xh-fgq2-m396; as of November 24, this advisory has not been published)
  • A change that rejects client_credentials requests from public clients with unauthorized_client. Previously, a public client's client_id alone was enough to obtain a token. To keep the old behavior, set allow_client_credentials_grant_for_public_clients to true

If you use client_credentials with public clients, you will no longer be able to obtain tokens after upgrading to 5.9.10. Before reverting this in the settings, check whether you actually need that usage.

Steps to check (editorial suggestion)

  1. Check the version. Look at the version of doorkeeper in Gemfile.lock. Below 5.9.1, you are affected by this issue; below 5.9.10, at least one of the fixes above is missing. As of November 24, the latest stable release is 5.9.10 (November 23), and 6.0.0 is still a release candidate (rc4, November 23).
  2. Check whether you use public clients. If none of your registered applications has confidential set to false, the conditions for this issue (GHSA-h5m9-42h9-vcq6) do not apply.
  3. Check how revocation requests are sent. In apps that are public clients, check that the client_id sent at logout matches the client that obtained the token. To be sure, upgrade in a test environment and confirm that the token actually stops working after logout.
  4. Check the view translations. The 5.9.1 changelog says an update may be needed if you have customized the authorization views (such as authorizations/new) or overridden the en.yml translations. If this applies, check how the pages are displayed.

Flaws in revocation do not surface even when the login screen works. We covered an issuer validation problem in authorization servers in our article on OAuth in the MCP Python SDK, and a SAML signature validation problem in our article on LightSAML. As in this case, it can take months from an advisory's publication in a repository to its listing in GitHub's database. For authentication components, include repository advisories and changelogs in what you check.

Scope of verification

On November 22 and 24, 2026, we checked the JSON for GHSA-h5m9-42h9-vcq6 in github/advisory-database (listed on November 19, 2026), the repository advisories in doorkeeper-gem/doorkeeper (GHSA-h5m9-42h9-vcq6 published on July 30) and the five later advisories, the diff and added tests of commit ecc1599, the changelog and configuration code at the v5.9.10 tag, and the list of versions on RubyGems (desk research). We did not run the tests locally or perform any upgrade.

GleamHub's development, AI and automation consulting covers reviewing and maintaining authentication in Rails apps. Please reach out via our contact form.

References

Share this articleXFacebook
Kakeru Suzuki

Fascinated by the possibilities of technology, has had a deep interest in programming and digital art since student days

Turn this article's theme into your company's next step

Concrete steps forward for your organization.

We organize your desired architecture, legacy systems, and operational requirements to formulate your next steps toward execution.

  • Desired architecture
  • Integration with existing environments
  • Operational requirements
Consult on development & operations initiatives

You can consult with us from the initial conceptual stage. Details from this article will be carried over to the inquiry form.

Receive the latest articles by email