CVE-2026-33504: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in ory hydra
Ory Hydra is an OAuth 2.0 Server and OpenID Connect Provider. Prior to version 26.2.0, the listOAuth2Clients, listOAuth2ConsentSessions, and listTrustedOAuth2JwtGrantIssuers Admin APIs in Ory Hydra are vulnerable to SQL injection due to flaws in its pagination implementation. Pagination tokens are encrypted using the secret configured in `secrets.pagination`. If this value is not set, Hydra falls back to using `secrets.system`. An attacker who knows this secret can craft their own tokens, including malicious tokens that lead to SQL injection. This issue can be exploited when one or more admin APIs listed above are directly or indirectly accessible to the attacker; the attacker can pass a raw pagination token to the affected API; and the configuration value `secrets.pagination` is set and known to the attacker, or `secrets.pagination` is not set and `secrets.system` is known to the attacker. An attacker can execute arbitrary SQL queries through forged pagination tokens. As a first line of defense, immediately configure a custom value for `secrets.pagination` by generating a cryptographically secure random secret. Next, upgrade Hydra to the fixed version, 26.2.0 as soon as possible.
AI Analysis
Technical Summary
Ory Hydra is an OAuth 2.0 Server and OpenID Connect Provider widely used for identity and access management. Versions prior to 26.2.0 contain a critical SQL injection vulnerability (CVE-2026-33504) in the admin APIs listOAuth2Clients, listOAuth2ConsentSessions, and listTrustedOAuth2JwtGrantIssuers. The root cause lies in the pagination implementation, where pagination tokens are encrypted using a secret configured in `secrets.pagination`. If this secret is unset, Hydra defaults to using `secrets.system`. An attacker who knows either secret can craft malicious pagination tokens that bypass input validation and inject arbitrary SQL commands into backend queries. This vulnerability requires the attacker to have access to the affected admin APIs, which may be exposed directly or indirectly. Exploiting this flaw allows execution of arbitrary SQL queries, potentially leading to data leakage, modification, or deletion, and could compromise the entire OAuth2 server's integrity and availability. The CVSS v3.1 score is 7.2 (high), reflecting network attack vector, low attack complexity, high privileges required, no user interaction, and high impact on confidentiality, integrity, and availability. No known exploits are reported in the wild yet. The recommended remediation is to immediately configure a strong, cryptographically secure secret for `secrets.pagination` and upgrade to Ory Hydra version 26.2.0 or later, which contains the fix.
Potential Impact
This vulnerability poses a significant risk to organizations using Ory Hydra for OAuth2 and OpenID Connect services. Exploitation can lead to unauthorized access to sensitive OAuth2 client and consent session data, manipulation or deletion of critical authentication records, and potential full compromise of the backend database. This undermines the trustworthiness of authentication and authorization processes, potentially allowing attackers to escalate privileges, impersonate users, or disrupt service availability. Organizations relying on Ory Hydra for identity management in cloud environments, microservices architectures, or critical infrastructure could face severe operational and reputational damage. The requirement for high privileges to exploit somewhat limits the attack surface, but insider threats or compromised admin interfaces increase risk. Failure to patch promptly may expose organizations to data breaches, regulatory non-compliance, and service outages.
Mitigation Recommendations
1. Immediately configure a strong, cryptographically secure random secret for the `secrets.pagination` configuration parameter to prevent attackers from forging valid pagination tokens. Avoid using default or system secrets. 2. Upgrade Ory Hydra to version 26.2.0 or later, which contains the patch addressing this SQL injection vulnerability. 3. Restrict access to the affected admin APIs (listOAuth2Clients, listOAuth2ConsentSessions, listTrustedOAuth2JwtGrantIssuers) to trusted administrators only, using network segmentation, firewall rules, and strong authentication mechanisms. 4. Monitor logs and audit trails for unusual or unauthorized API access patterns, especially attempts to use malformed pagination tokens. 5. Conduct regular security reviews and penetration testing focused on OAuth2 server components to detect similar injection or access control issues. 6. Implement database-level protections such as least privilege for the Hydra database user and query parameterization where possible. 7. Educate DevOps and security teams about the importance of secret management and timely patching of identity infrastructure components.
Affected Countries
United States, Germany, United Kingdom, Netherlands, France, Canada, Australia, Japan, South Korea, India
CVE-2026-33504: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in ory hydra
Description
Ory Hydra is an OAuth 2.0 Server and OpenID Connect Provider. Prior to version 26.2.0, the listOAuth2Clients, listOAuth2ConsentSessions, and listTrustedOAuth2JwtGrantIssuers Admin APIs in Ory Hydra are vulnerable to SQL injection due to flaws in its pagination implementation. Pagination tokens are encrypted using the secret configured in `secrets.pagination`. If this value is not set, Hydra falls back to using `secrets.system`. An attacker who knows this secret can craft their own tokens, including malicious tokens that lead to SQL injection. This issue can be exploited when one or more admin APIs listed above are directly or indirectly accessible to the attacker; the attacker can pass a raw pagination token to the affected API; and the configuration value `secrets.pagination` is set and known to the attacker, or `secrets.pagination` is not set and `secrets.system` is known to the attacker. An attacker can execute arbitrary SQL queries through forged pagination tokens. As a first line of defense, immediately configure a custom value for `secrets.pagination` by generating a cryptographically secure random secret. Next, upgrade Hydra to the fixed version, 26.2.0 as soon as possible.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Ory Hydra is an OAuth 2.0 Server and OpenID Connect Provider widely used for identity and access management. Versions prior to 26.2.0 contain a critical SQL injection vulnerability (CVE-2026-33504) in the admin APIs listOAuth2Clients, listOAuth2ConsentSessions, and listTrustedOAuth2JwtGrantIssuers. The root cause lies in the pagination implementation, where pagination tokens are encrypted using a secret configured in `secrets.pagination`. If this secret is unset, Hydra defaults to using `secrets.system`. An attacker who knows either secret can craft malicious pagination tokens that bypass input validation and inject arbitrary SQL commands into backend queries. This vulnerability requires the attacker to have access to the affected admin APIs, which may be exposed directly or indirectly. Exploiting this flaw allows execution of arbitrary SQL queries, potentially leading to data leakage, modification, or deletion, and could compromise the entire OAuth2 server's integrity and availability. The CVSS v3.1 score is 7.2 (high), reflecting network attack vector, low attack complexity, high privileges required, no user interaction, and high impact on confidentiality, integrity, and availability. No known exploits are reported in the wild yet. The recommended remediation is to immediately configure a strong, cryptographically secure secret for `secrets.pagination` and upgrade to Ory Hydra version 26.2.0 or later, which contains the fix.
Potential Impact
This vulnerability poses a significant risk to organizations using Ory Hydra for OAuth2 and OpenID Connect services. Exploitation can lead to unauthorized access to sensitive OAuth2 client and consent session data, manipulation or deletion of critical authentication records, and potential full compromise of the backend database. This undermines the trustworthiness of authentication and authorization processes, potentially allowing attackers to escalate privileges, impersonate users, or disrupt service availability. Organizations relying on Ory Hydra for identity management in cloud environments, microservices architectures, or critical infrastructure could face severe operational and reputational damage. The requirement for high privileges to exploit somewhat limits the attack surface, but insider threats or compromised admin interfaces increase risk. Failure to patch promptly may expose organizations to data breaches, regulatory non-compliance, and service outages.
Mitigation Recommendations
1. Immediately configure a strong, cryptographically secure random secret for the `secrets.pagination` configuration parameter to prevent attackers from forging valid pagination tokens. Avoid using default or system secrets. 2. Upgrade Ory Hydra to version 26.2.0 or later, which contains the patch addressing this SQL injection vulnerability. 3. Restrict access to the affected admin APIs (listOAuth2Clients, listOAuth2ConsentSessions, listTrustedOAuth2JwtGrantIssuers) to trusted administrators only, using network segmentation, firewall rules, and strong authentication mechanisms. 4. Monitor logs and audit trails for unusual or unauthorized API access patterns, especially attempts to use malformed pagination tokens. 5. Conduct regular security reviews and penetration testing focused on OAuth2 server components to detect similar injection or access control issues. 6. Implement database-level protections such as least privilege for the Hydra database user and query parameterization where possible. 7. Educate DevOps and security teams about the importance of secret management and timely patching of identity infrastructure components.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-20T16:59:08.888Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 69c574363c064ed76f96818a
Added to database: 3/26/2026, 6:00:22 PM
Last enriched: 3/26/2026, 6:15:16 PM
Last updated: 5/10/2026, 8:56:33 AM
Views: 335
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.