GHSA-R9W3-57W2-GCH2
Vulnerability from github – Published: 2026-03-20 20:55 – Updated: 2026-03-27 20:59
VLAI?
Summary
Ory Hydra has a SQL injection via forged pagination tokens
Details
Description
Following Admin APIs in Ory Hydra are vulnerable to SQL injection due to flaws in its pagination implementation:
- listOAuth2Clients
- listOAuth2ConsentSessions
- listTrustedOAuth2JwtGrantIssuers
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.
Preconditions
This issue can be exploited when the following conditions are met:
- 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
- The configuration value
secrets.paginationis set and known to the attacker, orsecrets.paginationis not set andsecrets.systemis 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 Hydra to the fixed version as soon as possible.
Severity ?
7.2 (High)
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/ory/hydra"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.11.10"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/ory/hydra/v2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.3.1-0.20260320110106-0b84568fffcc"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-33504"
],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-20T20:55:04Z",
"nvd_published_at": "2026-03-26T18:16:31Z",
"severity": "HIGH"
},
"details": "## 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**.",
"id": "GHSA-r9w3-57w2-gch2",
"modified": "2026-03-27T20:59:48Z",
"published": "2026-03-20T20:55:04Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/ory/hydra/security/advisories/GHSA-r9w3-57w2-gch2"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33504"
},
{
"type": "PACKAGE",
"url": "https://github.com/ory/hydra"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Ory Hydra has a SQL injection via forged pagination tokens"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…