CVE-2021-32701: Incorrect Authorization in ORY Oathkeeper

github.com/ory/oathkeeper Updated 02 Oct 2025

Summary

24/06/2021
Yes i
High
7.5

CVE-2021-32701: Incorrect Authorization in ORY Oathkeeper. Affects github.com/ory/oathkeeper versions >= 0.38.0-beta.2, < 0.38.12-beta.1. Fixed in 0.38.12-beta.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

ORY Oathkeeper is an Identity & Access Proxy (IAP) and Access Control Decision API that authorizes HTTP requests based on sets of Access Rules. It provides functionality for validating access tokens and enforcing access control policies. The vulnerability in ORY Oathkeeper allows unauthorized access to endpoints that require specific scopes. This vulnerability exists in versions 0.38.0-beta.2 to 0.38.11-beta.1 of the package 'github.com/ory/oathkeeper'.

Vulnerability Detail

The vulnerability arises when a request is made to an endpoint that requires a certain scope using an access token granted with that scope. If a second request is made to an endpoint that requires a different scope before the cache has expired, the introspection will still be valid, regardless of whether the token is granted the required scope or not. This allows unauthorized access to endpoints that should be restricted. The vulnerability was introduced in PR #424 and was not caught during the review process due to a lack of appropriate test coverage.

How To Fix

Minimum fixed version

0.38.12-beta.1

This is the first release that contains the fix.

go get github.com/ory/oathkeeper@v0.38.12-beta.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the package is not immediately possible, a workaround is to disable caching for the 'oauth2_introspection' authenticator. By disabling caching, the vulnerability is mitigated. However, this may impact performance, so it is recommended to update to the patched version as soon as feasible. To disable caching, modify the configuration of the 'oauth2_introspection' authenticator to set the cache duration to zero.

Conclusion

The vulnerability in ORY Oathkeeper allows unauthorized access to endpoints that require specific scopes. It is important to update to the patched version (0.38.12-beta.1 or later) of the 'github.com/ory/oathkeeper' package to mitigate this vulnerability. If immediate updating is not possible, disabling caching for the 'oauth2_introspection' authenticator can serve as a temporary workaround. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for github.com/ory/oathkeeper →

Share this vulnerability

FAQ

ORY Oathkeeper is an Identity & Access Proxy (IAP) and Access Control Decision API that authorizes HTTP requests based on sets of Access Rules. It provides functionality for validating access tokens and enforcing access control policies.

The vulnerability allows unauthorized access to endpoints that require specific scopes. This can lead to unauthorized actions being performed by attackers who exploit the vulnerability.

Versions 0.38.0-beta.2 to 0.38.11-beta.1 of the 'github.com/ory/oathkeeper' package are affected by this vulnerability.

To fix this vulnerability, update to version 0.38.12-beta.1 or later of the 'github.com/ory/oathkeeper' package. This version includes a patch that addresses the incorrect authorization issue.

Yes, a workaround is to disable caching for the 'oauth2_introspection' authenticator. This can be done by modifying the configuration to set the cache duration to zero. However, it is recommended to update to the patched version as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/ory/oathkeeper.

How To Fix

Minimum fixed version

0.38.12-beta.1

This is the first release that contains the fix.

go get github.com/ory/oathkeeper@v0.38.12-beta.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback