7.2high
Ory Keto has a SQL injection via forged pagination tokens
- Severity
- 7.2high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.25% (higher than 17% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-c38g-mx2c-9wf2GO-2026-4800
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| ory keto | < 26.2.0, before 26.2.0 | CVE List, NVD |
| github.com/ory/keto (Go) | before 0.14.1-0.20260320140104-e4393662cd2e | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
Description
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.
Preconditions
This issue can be exploited when all of the following conditions are met:
- GetRelationships API is directly or indirectly accessible to the attacker
- The attacker can pass a raw pagination token to the affected API
- The configuration value
secrets.paginationis not set or known to the attacker
Impact
An attacker can execute arbitrary SQL queries through forged pagination tokens.
Mitigation
As a first line of defense, immediately configure a custom value for secrets.pagination by generating a cryptographically secure random secret, for example:
openssl rand -base64 32
Next, upgrade Keto to a fixed version as soon as possible.
Go Vulnerability Database
Ory Keto has a SQL injection via forged pagination tokens in github.com/ory/keto
NVD (es)
Ory Keto es un servidor de autorización de código abierto para gestionar permisos a escala. Antes de la versión 26.2.0, la API GetRelationships en Ory Keto es vulnerable a inyección SQL debido a fallos en su implementación de paginación. Los tokens de paginación están cifrados usando el secreto configurado en 'secrets.pagination'. Un atacante que conoce este secreto puede crear sus propios tokens, incluyendo tokens maliciosos que conducen a inyección SQL. Si este valor de configuración no está establecido, Keto recurre a un secreto de cifrado de paginación predeterminado codificado. Dado que este valor predeterminado es de conocimiento público, los atacantes pueden generar tokens de paginación válidos y maliciosos manualmente para instalaciones donde este secreto no está configurado. Este problema puede ser explotado cuando la API GetRelationships es directa o indirectamente accesible para el atacante, el atacante puede pasar un token de paginación sin procesar a la API afectada, y el valor de configuración 'secrets.pagination' no está establecido o es conocido por el atacante. Un atacante puede ejecutar consultas SQL arbitrarias a través de tokens de paginación falsificados. Como primera línea de defensa, configure inmediatamente un valor personalizado para 'secrets.pagination' generando un secreto aleatorio criptográficamente seguro. A continuación, actualice Keto a una versión corregida, 26.2.0 o posterior, tan pronto como sea posible.
References
| https://github.com/ory/keto/security/advisories/GHSA-c38g-mx2c-9wf2 | advisory, mitigation, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-33505 | advisory | |
| https://github.com/ory/keto | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-33505 changed 2026-03-30 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-c38g-mx2c-9wf2 changed 2026-03-27 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4800 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-33505 changed 2026-06-17 | Public domain |