CVE-2026-33505: Github.com/ory/keto SQL Injection Vulnerability
HIGHCVE-2026-33505 is a HIGH (CVSS 7.2) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Github.com/ory/keto libraries in the Go ecosystem. The issue involves ory keto has a sql injection via forged pagination tokens. Remediation is available by upgrading affected packages to version 0.14.1-0.20260320140104-e4393662cd2e.
CVE-2026-33505 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-33505
To remediate this vulnerability, upgrade all affected Github.com/ory/keto dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/ory/keto to 0.14.1-0.20260320140104-e4393662cd2e
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ory/keto
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-33505, inspect your project dependencies for Github.com/ory/keto:
inspect dependencies for github.com/ory/keto
Analyze the terminal output to locate any version of Github.com/ory/keto in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.1-0.20260320140104-e4393662cd2e), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Github.com/ory/keto, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33505 Affected Github.com/ory/keto Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ory/keto
|
Go |
< 0.14.1-0.20260320140104-e4393662cd2e
|
0.14.1-0.20260320140104-e4393662cd2e
|
References
Frequently Asked Questions
What is CVE-2026-33505?
Which Github.com/ory/keto versions are affected?
What version fixes CVE-2026-33505?
Is github.com/ory/keto affected?
What is the CVSS score of CVE-2026-33505?
What CWE is associated with CVE-2026-33505?
How can I check Go dependencies for CVE-2026-33505?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c38g-mx2c-9wf2",
"modified" : "2026-03-27T21:17:31Z",
"published" : "2026-03-20T20:55:44Z",
"aliases" : [ "CVE-2026-33505" ],
"summary" : "Ory Keto has a SQL injection via forged pagination tokens",
"details" : "## Description\n\nThe **GetRelationships API** in Ory Keto is vulnerable to SQL injection due to flaws in its pagination implementation.\n\nPagination 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.\n\n## Preconditions\n\nThis issue can be exploited when all of the following conditions are met:\n\n- **GetRelationships API** is directly or indirectly accessible to the attacker\n- The attacker can pass a raw pagination token to the affected API\n- The configuration value `secrets.pagination` is not set or known to the attacker\n\n## Impact\n\nAn attacker can execute arbitrary SQL queries through forged pagination tokens.\n\n## Mitigation\n\nAs a first line of defense, **immediately** configure a custom value for `secrets.pagination` by generating a cryptographically secure random secret, for example:\n\n```\nopenssl rand -base64 32\n```\n\nNext, upgrade **Keto** to a fixed version **as soon as possible**.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ory/keto"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.14.1-0.20260320140104-e4393662cd2e"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ory/keto/security/advisories/GHSA-c38g-mx2c-9wf2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33505"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ory/keto"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-20T20:55:44Z",
"nvd_published_at" : "2026-03-26T19:17:04Z"
}
}