{"id":"GHSA-r9w3-57w2-gch2","revision":"b53899b19eb14301bc71aa55f28646bc","records":[{"revision":"b53899b19eb14301bc71aa55f28646bc","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-r9w3-57w2-gch2","aliases":["CVE-2026-33504","GO-2026-4807"],"title":"Ory Hydra has a SQL injection via forged pagination tokens","description":"## Description\n\nFollowing Admin APIs in Ory Hydra are vulnerable to SQL injection due to flaws in its pagination implementation:\n\n- listOAuth2Clients\n- listOAuth2ConsentSessions\n- listTrustedOAuth2JwtGrantIssuers\n\nPagination 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.\n\n## Preconditions\n\nThis issue can be exploited when the following conditions are met:\n\n- One or more **admin APIs** listed above are 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 set and known to the attacker, or `secrets.pagination` is not set and `secrets.system` is 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 **Hydra** to the fixed version **as soon as possible**.","state":0,"publishedAt":"2026-03-20T20:55:04+00:00","modifiedAt":"2026-09-10T03:50:40.762451+00:00","affected":[{"ecosystem":"Go","name":"github.com/ory/hydra","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"1.11.10"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/ory/hydra/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.3.1-0.20260320110106-0b84568fffcc"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/ory/hydra/security/advisories/GHSA-r9w3-57w2-gch2","https://nvd.nist.gov/vuln/detail/CVE-2026-33504","https://github.com/ory/hydra"],"sourceUrl":"https://github.com/advisories/GHSA-r9w3-57w2-gch2","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-r9w3-57w2-gch2","identifiers":["GHSA-r9w3-57w2-gch2","CVE-2026-33504","GO-2026-4807"]},"retained":false,"historicalAffected":[]}],"coverage":[]}