CVE-2026-22797
OAuth 2.0 Header Injection in OpenStack Keystone Middleware Enables Privilege Escalation
Publication date: 2026-01-19
Last updated on: 2026-01-19
Assigner: MITRE
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| openstack | keystonemiddleware | From 10.5 (inc) to 10.7.2 (exc) |
| openstack | keystonemiddleware | From 10.8 (inc) to 10.9.1 (exc) |
| openstack | keystonemiddleware | From 10.10 (inc) to 10.12.1 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-290 | This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. |
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
This vulnerability allows an authenticated attacker to escalate privileges or impersonate other users by forging identity headers, potentially leading to unauthorized access to sensitive data. Such unauthorized access could result in non-compliance with standards and regulations like GDPR and HIPAA, which require strict access controls and protection of personal and sensitive information. Therefore, deployments affected by this vulnerability may face compliance risks if exploited. [1, 2]
Can you explain this vulnerability to me?
CVE-2026-22797 is a critical privilege escalation vulnerability in OpenStack keystonemiddleware's external_oauth2_token middleware. The issue occurs because the middleware fails to sanitize incoming authentication headers before processing OAuth 2.0 tokens. Specifically, it does not remove or clear potentially forged identity headers such as X-Is-Admin-Project, X-Roles, or X-User-Id. This allows an authenticated attacker to send spoofed headers to escalate their privileges to project administrator or impersonate other users, bypassing role restrictions. The vulnerability affects all deployments using the external_oauth2_token middleware in certain versions prior to fixed releases. The fix involves sanitizing all incoming identity headers at the start of request processing and explicitly unsetting admin-related headers when the token lacks admin privileges. [1, 2]
How can this vulnerability impact me? :
This vulnerability can allow an authenticated attacker to escalate their privileges within an OpenStack deployment by forging identity headers. They can impersonate other users or gain administrative project privileges, potentially leading to unauthorized access, data exposure, or unauthorized actions within the cloud environment. This bypasses normal role-based access controls and can compromise the security and integrity of the system. [1, 2]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
To detect this vulnerability, you should check if your deployment is using the vulnerable versions of keystonemiddleware's external_oauth2_token middleware (versions >=10.5.0 <10.7.2, >=10.8.0 <10.9.1, and >=10.10.0 <10.12.1). Additionally, monitoring incoming authentication headers for suspicious or forged identity headers such as X-Is-Admin-Project, X-Roles, or X-User-Id can help identify exploitation attempts. Commands to check the installed version of keystonemiddleware could include: `pip show keystonemiddleware` or checking package manager versions. Network monitoring tools or HTTP proxies can be used to inspect OAuth 2.0 token requests for unexpected or forged headers. Specific commands are not provided in the resources. [1, 2]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include upgrading keystonemiddleware to a fixed version where the vulnerability is patched: versions 10.7.2 or later in the 10.7.x series, 10.9.1 or later in the 10.9.x series, and 10.12.1 or later in the 10.12.x series. The fix involves sanitizing incoming authentication headers by calling `remove_auth_headers()` at the start of request processing and explicitly unsetting the `HTTP_X_IS_ADMIN_PROJECT` header when the token does not have admin privileges. If upgrading immediately is not possible, consider restricting access to the external_oauth2_token middleware to trusted sources only and monitoring for suspicious header injection attempts. [1, 2]