{"answers":{"affected":"6 open source packages ship an affected version, including github.com/ory/oathkeeper. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-32701 in the wild and no public exploit code.","fix":"Upgrade github.com/ory/oathkeeper to 0.38.12-beta.1 or later.","what":"CVE-2021-32701 is a high-severity authentication bypass vulnerability in ory oathkeeper, published on 22 Jun 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-32701 and fix it if it is affected.\n\nWhat it is: CVE-2021-32701 is a high-severity authentication bypass vulnerability in ory oathkeeper, published on 22 Jun 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-32701 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/ory/oathkeeper (Go): affected from 0.38.0-beta.2; fixed in 0.38.12-beta.1\n- github.com/ory/oathkeeper (Go): affected from 0.38.0-beta.2; fixed in 0.38.12-beta.1\n- github.com/ory/oathkeeper (Go): affected from 0.38.0-beta.2; fixed in 0.38.12-beta.1\n- github.com/ory/oathkeeper (Go): affected from 0.38.0-beta.2; fixed in 0.38.12-beta.1\n- github.com/ory/oathkeeper (Go): affected from 0.38.0-beta.2; fixed in 0.38.12-beta.1\n- github.com/ory/oathkeeper (Go): affected from 0.38.0-beta.2; fixed in 0.38.12-beta.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-32701/ (Markdown: https://insights.sbomify.com/CVE-2021-32701/index.md)","id":"CVE-2021-32701","markdown":"https://insights.sbomify.com/CVE-2021-32701/index.md","name":"CVE-2021-32701","record":{"aliases":["GHSA-qvp4-rpmr-xwrr","GHSA-vfvf-6gx5-mqv6","GO-2022-0406","GO-2022-0920"],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Identity Access Proxy","requires_auth":"none","summary":"Attackers can bypass scope validation in ORY Oathkeeper when OAuth2 introspection caching is enabled, gaining unauthorized access to protected endpoints.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"oathkeeper","vendor":"ory"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"description":"ORY Oathkeeper is an Identity \u0026 Access Proxy (IAP) and Access Control Decision API that authorizes HTTP requests based on sets of Access Rules. When you make a request to an endpoint that requires the scope `foo` using an access token granted with that `foo` scope, introspection will be valid and that token will be cached. The problem comes when a second requests to an endpoint that requires the scope `bar` is made before the cache has expired. Whether the token is granted or not to the `bar` scope, introspection will be valid. A patch will be released with `v0.38.12-beta.1`. Per default, caching is disabled for the `oauth2_introspection` authenticator. When caching is disabled, this vulnerability does not exist. The cache is checked in [`func (a *AuthenticatorOAuth2Introspection) Authenticate(...)`](https://github.com/ory/oathkeeper/blob/6a31df1c3779425e05db1c2a381166b087cb29a4/pipeline/authn/authenticator_oauth2_introspection.go#L152). From [`tokenFromCache()`](https://github.com/ory/oathkeeper/blob/6a31df1c3779425e05db1c2a381166b087cb29a4/pipeline/authn/authenticator_oauth2_introspection.go#L97) it seems that it only validates the token expiration date, but ignores whether the token has or not the proper scopes. The vulnerability was introduced in PR #424. During review, we failed to require appropriate test coverage by the submitter which is the primary reason that the vulnerability passed the review process.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Possible bypass of token claim validation when OAuth2 Introspection caching is enabled","id":"CVE-2021-32701","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"auth_bypass","year":"2021"},"n_packages":6,"n_references":3,"next":{"headline":"Reflected XSS from the callback handler's error query parameter","id":"CVE-2021-32702"},"packages":[{"ecosystem":"Go","fixed":["0.38.12-beta.1"],"introduced":["0.38.0-beta.2"],"last_affected":[],"package":"github.com/ory/oathkeeper","purl":null,"source":"GHSA-qvp4-rpmr-xwrr"},{"ecosystem":"Go","fixed":["0.38.12-beta.1"],"introduced":["0.38.0-beta.2"],"last_affected":[],"package":"github.com/ory/oathkeeper","purl":"pkg:golang/github.com/ory/oathkeeper","source":"GHSA-qvp4-rpmr-xwrr"},{"ecosystem":"Go","fixed":["0.38.12-beta.1"],"introduced":["0.38.0-beta.2"],"last_affected":[],"package":"github.com/ory/oathkeeper","purl":null,"source":"GHSA-vfvf-6gx5-mqv6"},{"ecosystem":"Go","fixed":["0.38.12-beta.1"],"introduced":["0.38.0-beta.2"],"last_affected":[],"package":"github.com/ory/oathkeeper","purl":"pkg:golang/github.com/ory/oathkeeper","source":"GHSA-vfvf-6gx5-mqv6"},{"ecosystem":"Go","fixed":["0.38.12-beta.1"],"introduced":["0.38.0-beta.2"],"last_affected":[],"package":"github.com/ory/oathkeeper","purl":"pkg:golang/github.com/ory/oathkeeper","source":"GO-2022-0406"},{"ecosystem":"Go","fixed":["0.38.12-beta.1"],"introduced":["0.38.0-beta.2"],"last_affected":[],"package":"github.com/ory/oathkeeper","purl":"pkg:golang/github.com/ory/oathkeeper","source":"GO-2022-0920"}],"prev":{"headline":"Supply chain attack via MiTM against users","id":"CVE-2021-32700"},"products":["oathkeeper"],"published":"2021-06-22","related":[{"cvss_score":10,"headline":"Ory Oathkeeper has a path traversal authorization bypass","id":"CVE-2026-33494","kev_date_added":null,"published":"2026-03-26"},{"cvss_score":8.1,"headline":"Ory Oathkeeper has an authentication bypass by cache key confusion","id":"CVE-2026-33496","kev_date_added":null,"published":"2026-03-26"},{"cvss_score":6.5,"headline":"Ory Oathkeeper has an authentication bypass by usage of untrusted header","id":"CVE-2026-33495","kev_date_added":null,"published":"2026-03-26"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["ory"]},"summary":"Attackers can bypass scope validation in ORY Oathkeeper when OAuth2 introspection caching is enabled, gaining unauthorized access to protected endpoints.","url":"https://insights.sbomify.com/CVE-2021-32701/"}