{"schema_version":"1.7.5","id":"GHSA-hgx2-28f8-6g2r","published":"2026-03-20T20:54:54Z","modified":"2026-03-27T21:20:15.936696Z","aliases":["CVE-2026-33503","GO-2026-4801"],"summary":"Ory Kratos has a SQL injection via forged pagination tokens","details":"## Description\n\nThe **ListCourierMessages** Admin API in Ory Kratos 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, Kratos falls back to a 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 the following conditions are met:\n\n- **ListCourierMessages 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 **Kratos** to a fixed version **as soon as possible**.","affected":[{"package":{"name":"github.com/ory/kratos","ecosystem":"Go","purl":"pkg:golang/github.com/ory/kratos"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.3.1-0.20260320110106-9d7085948039"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-hgx2-28f8-6g2r/GHSA-hgx2-28f8-6g2r.json"}}],"references":[{"type":"WEB","url":"https://github.com/ory/kratos/security/advisories/GHSA-hgx2-28f8-6g2r"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33503"},{"type":"PACKAGE","url":"https://github.com/ory/kratos"}],"database_specific":{"cwe_ids":["CWE-89"],"github_reviewed":true,"github_reviewed_at":"2026-03-20T20:54:54Z","nvd_published_at":"2026-03-26T18:16:30Z","severity":"HIGH"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"}]}