CVE-2026-33505: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in ory keto
Ory Keto is am open source authorization server for managing permissions at scale. Prior to version 26.2.0, the GetRelationships API in Ory Keto is vulnerable to SQL injection due to flaws in its pagination implementation. Pagination tokens are encrypted using the secret configured in `secrets.pagination`. An attacker who knows this secret can craft their own tokens, including malicious tokens that lead to SQL injection. If this configuration value is not set, Keto falls back to a hard-coded default pagination encryption secret. Because this default value is publicly known, attackers can generate valid and malicious pagination tokens manually for installations where this secret is not set. This issue can be exploited when GetRelationships API is 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 not set or 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 Keto to a fixed version, 26.2.0 or later, as soon as possible.
AI Analysis
Technical Summary
Ory Keto is an open-source authorization server designed to manage permissions at scale. Prior to version 26.2.0, the GetRelationships API in Ory Keto contains a critical SQL injection vulnerability (CVE-2026-33505) due to improper neutralization of special elements in SQL commands (CWE-89). The vulnerability stems from the pagination implementation, where pagination tokens are encrypted using a secret configured in `secrets.pagination`. If this secret is not set, Keto defaults to a hard-coded, publicly known secret. An attacker who knows or can guess this secret can craft malicious pagination tokens that, when passed to the GetRelationships API, result in execution of arbitrary SQL queries. This can lead to unauthorized data disclosure, data manipulation, or denial of service. Exploitation requires network access to the API and knowledge or absence of the pagination secret. The vulnerability has a CVSS 3.1 base score of 7.2 (high severity), reflecting its potential to compromise confidentiality, integrity, and availability without user interaction but requiring some privileges or access. The recommended remediation is twofold: first, immediately configure a strong, cryptographically secure secret for `secrets.pagination` to prevent token forgery; second, upgrade Ory Keto to version 26.2.0 or later where the vulnerability is fixed. No known exploits are reported in the wild yet, but the risk remains significant due to the ease of token forgery when the secret is unset or known.
Potential Impact
The SQL injection vulnerability in Ory Keto's GetRelationships API can have severe consequences for organizations relying on this authorization server. Successful exploitation allows attackers to execute arbitrary SQL commands, potentially leading to unauthorized access to sensitive permission data, modification or deletion of authorization records, and disruption of authorization services. This compromises the confidentiality, integrity, and availability of the authorization system, which is critical for enforcing access controls across applications and services. Organizations may face data breaches, privilege escalation, and service outages, impacting business operations and regulatory compliance. Since Ory Keto is used in cloud-native and microservices environments, the vulnerability could be leveraged to pivot attacks within internal networks. The impact is amplified if the default or weak pagination secret is used, making exploitation straightforward. Although no active exploits are currently known, the vulnerability's high severity and ease of exploitation in misconfigured deployments pose a significant risk worldwide.
Mitigation Recommendations
1. Immediately configure a strong, cryptographically secure random secret for the `secrets.pagination` configuration in Ory Keto to prevent attackers from forging valid pagination tokens. Avoid using default or guessable secrets. 2. Upgrade all Ory Keto instances to version 26.2.0 or later, which contains the fix for this SQL injection vulnerability. 3. Restrict network access to the GetRelationships API endpoint to trusted clients only, using network segmentation, firewalls, or API gateways to reduce exposure. 4. Implement monitoring and alerting for unusual API usage patterns or malformed pagination tokens that could indicate exploitation attempts. 5. Conduct regular security audits and penetration testing focused on authorization components to detect similar injection flaws. 6. Review and harden database permissions used by Ory Keto to limit the impact of potential SQL injection attacks. 7. Educate development and operations teams about secure configuration management to prevent fallback to insecure defaults.
Affected Countries
United States, Germany, Netherlands, Canada, United Kingdom, Australia, Japan, India, France, Sweden
CVE-2026-33505: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in ory keto
Description
Ory Keto is am open source authorization server for managing permissions at scale. Prior to version 26.2.0, the GetRelationships API in Ory Keto is vulnerable to SQL injection due to flaws in its pagination implementation. Pagination tokens are encrypted using the secret configured in `secrets.pagination`. An attacker who knows this secret can craft their own tokens, including malicious tokens that lead to SQL injection. If this configuration value is not set, Keto falls back to a hard-coded default pagination encryption secret. Because this default value is publicly known, attackers can generate valid and malicious pagination tokens manually for installations where this secret is not set. This issue can be exploited when GetRelationships API is 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 not set or 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 Keto to a fixed version, 26.2.0 or later, as soon as possible.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Ory Keto is an open-source authorization server designed to manage permissions at scale. Prior to version 26.2.0, the GetRelationships API in Ory Keto contains a critical SQL injection vulnerability (CVE-2026-33505) due to improper neutralization of special elements in SQL commands (CWE-89). The vulnerability stems from the pagination implementation, where pagination tokens are encrypted using a secret configured in `secrets.pagination`. If this secret is not set, Keto defaults to a hard-coded, publicly known secret. An attacker who knows or can guess this secret can craft malicious pagination tokens that, when passed to the GetRelationships API, result in execution of arbitrary SQL queries. This can lead to unauthorized data disclosure, data manipulation, or denial of service. Exploitation requires network access to the API and knowledge or absence of the pagination secret. The vulnerability has a CVSS 3.1 base score of 7.2 (high severity), reflecting its potential to compromise confidentiality, integrity, and availability without user interaction but requiring some privileges or access. The recommended remediation is twofold: first, immediately configure a strong, cryptographically secure secret for `secrets.pagination` to prevent token forgery; second, upgrade Ory Keto to version 26.2.0 or later where the vulnerability is fixed. No known exploits are reported in the wild yet, but the risk remains significant due to the ease of token forgery when the secret is unset or known.
Potential Impact
The SQL injection vulnerability in Ory Keto's GetRelationships API can have severe consequences for organizations relying on this authorization server. Successful exploitation allows attackers to execute arbitrary SQL commands, potentially leading to unauthorized access to sensitive permission data, modification or deletion of authorization records, and disruption of authorization services. This compromises the confidentiality, integrity, and availability of the authorization system, which is critical for enforcing access controls across applications and services. Organizations may face data breaches, privilege escalation, and service outages, impacting business operations and regulatory compliance. Since Ory Keto is used in cloud-native and microservices environments, the vulnerability could be leveraged to pivot attacks within internal networks. The impact is amplified if the default or weak pagination secret is used, making exploitation straightforward. Although no active exploits are currently known, the vulnerability's high severity and ease of exploitation in misconfigured deployments pose a significant risk worldwide.
Mitigation Recommendations
1. Immediately configure a strong, cryptographically secure random secret for the `secrets.pagination` configuration in Ory Keto to prevent attackers from forging valid pagination tokens. Avoid using default or guessable secrets. 2. Upgrade all Ory Keto instances to version 26.2.0 or later, which contains the fix for this SQL injection vulnerability. 3. Restrict network access to the GetRelationships API endpoint to trusted clients only, using network segmentation, firewalls, or API gateways to reduce exposure. 4. Implement monitoring and alerting for unusual API usage patterns or malformed pagination tokens that could indicate exploitation attempts. 5. Conduct regular security audits and penetration testing focused on authorization components to detect similar injection flaws. 6. Review and harden database permissions used by Ory Keto to limit the impact of potential SQL injection attacks. 7. Educate development and operations teams about secure configuration management to prevent fallback to insecure defaults.
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: 69c582253c064ed76fa7cc80
Added to database: 3/26/2026, 6:59:49 PM
Last enriched: 3/26/2026, 7:14:47 PM
Last updated: 3/26/2026, 8:36:51 PM
Views: 4
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.