{"id":"CVE-2020-5300","aliases":["EUVD-2021-0921","GHSA-3p3g-vpw6-4w66","GO-2022-0786"],"status":"published","title":"Disallow replay of `private_key_jwt` by blacklisting JTIs in Hydra","description":"In Hydra (an OAuth2 Server and OpenID Certified™ OpenID Connect Provider written in Go), before version 1.4.0+oryOS.17, when using client authentication method 'private_key_jwt' [1], 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 check the uniqueness of this `jti` value. Exploiting this vulnerability is somewhat difficult because: - TLS protects against MITM which makes it difficult to intercept valid tokens for replay attacks - The expiry time of the JWT gives only a short window of opportunity where it could be replayed This has been patched in version v1.4.0+oryOS.17","severity":{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.01028,"percentile":0.64061,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-294"],"published":"2020-04-06T16:30:14Z","modified":"2026-10-20T10:54:22Z","fixes":[{"ecosystem":"Go","package":"github.com/ory/hydra","fixed_in":["1.4.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/ory/hydra","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/ory/hydra","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.4.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/ory/hydra","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.4.0"}]}]}],"products":[{"vendor":"ory","product":"hydra"}],"references":[{"url":"https://github.com/ory/hydra/security/advisories/GHSA-3p3g-vpw6-4w66","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/ory/hydra/commit/700d17d3b7d507de1b1d459a7261d6fb2571ebe3","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/ory/hydra/releases/tag/v1.4.0","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-5300","tags":["advisory"]},{"url":"https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication","tags":["web"]},{"url":"https://github.com/advisories/GHSA-3p3g-vpw6-4w66"},{"url":"https://github.com/ory/hydra","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2020-5300","title":"Disallow replay of `private_key_jwt` by blacklisting JTIs in Hydra","description":"In Hydra (an OAuth2 Server and OpenID Certified™ OpenID Connect Provider written in Go), before version 1.4.0+oryOS.17, when using client authentication method 'private_key_jwt' [1], 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 check the uniqueness of this `jti` value. Exploiting this vulnerability is somewhat difficult because: - TLS protects against MITM which makes it difficult to intercept valid tokens for replay attacks - The expiry time of the JWT gives only a short window of opportunity where it could be replayed This has been patched in version v1.4.0+oryOS.17","status":"published","published":"2020-04-06T16:30:14Z","modified":"2024-08-04T08:22:09.093Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-294"],"updated_at":"2026-11-02T14:35:47.56691Z"}],"euvd":[{"id":"EUVD-2021-0921","description":"In Hydra (an OAuth2 Server and OpenID Certified™ OpenID Connect Provider written in Go), before version 1.4.0+oryOS.17, when using client authentication method 'private_key_jwt' [1], 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 check the uniqueness of this `jti` value. Exploiting this vulnerability is somewhat difficult because: - TLS protects against MITM which makes it difficult to intercept valid tokens for replay attacks - The expiry time of the JWT gives only a short window of opportunity where it could be replayed This has been patched in version v1.4.0+oryOS.17","status":"published","published":"2020-04-06T16:30:14Z","modified":"2024-08-04T08:22:09Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-03T03:08:06.745484Z"}],"ghsa":[{"id":"GHSA-3p3g-vpw6-4w66","title":"Authentication Bypass in hydra","description":"### Impact\n\nWhen using client authentication method \"private_key_jwt\" [1], 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\"}⏎            ~$ 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### Severity\n\nWe rate the severity as medium because the following reasons make it hard to replay tokens without the patch:\u0010\n\n- TLS protects against MITM which makes it difficult to intercept valid tokens for replay attacks\n- The expiry time of the JWT gives only a short window of opportunity where it could be replayed\n\n### Patches\n\nThis will be patched with v1.4.0+oryOS.17\n\n### Workarounds\n\nTwo workarounds have been identified:\n\n- Do not allow clients to use `private_key_jwt`\n- Use short expiry times for the JWTs\n\n### References\n\nhttps://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication\n\n### Upstream\n\nThis issue will be resolved in the upstream repository https://github.com/ory/fosite","status":"published","published":"2021-05-27T18:43:22Z","modified":"2023-09-29T17:16:04Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-294"],"updated_at":"2026-11-02T14:37:06.913882Z"}],"nvd":[{"id":"CVE-2020-5300","description":"In Hydra (an OAuth2 Server and OpenID Certified™ OpenID Connect Provider written in Go), before version 1.4.0+oryOS.17, when using client authentication method 'private_key_jwt' [1], 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 check the uniqueness of this `jti` value. Exploiting this vulnerability is somewhat difficult because: - TLS protects against MITM which makes it difficult to intercept valid tokens for replay attacks - The expiry time of the JWT gives only a short window of opportunity where it could be replayed This has been patched in version v1.4.0+oryOS.17","status":"published","published":"2020-04-06T17:15:13.367Z","modified":"2026-06-17T03:21:14.01Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":3.5,"vector":"AV:N/AC:M/Au:S/C:P/I:N/A:N","level":"low","assessor":"primary"}],"cwes":["CWE-294"],"updated_at":"2026-11-02T14:05:57.678762Z"}],"osv":[{"id":"CVE-2020-5300","description":"In Hydra (an OAuth2 Server and OpenID Certified™ OpenID Connect Provider written in Go), before version 1.4.0+oryOS.17, when using client authentication method 'private_key_jwt' [1], 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 check the uniqueness of this `jti` value. Exploiting this vulnerability is somewhat difficult because: - TLS protects against MITM which makes it difficult to intercept valid tokens for replay attacks - The expiry time of the JWT gives only a short window of opportunity where it could be replayed This has been patched in version v1.4.0+oryOS.17","status":"published","published":"2020-04-06T17:15:13.367Z","modified":"2026-10-20T10:54:22.544133336Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:16.936975Z"},{"id":"GHSA-3p3g-vpw6-4w66","title":"Authentication Bypass in hydra","description":"### Impact\n\nWhen using client authentication method \"private_key_jwt\" [1], 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\"}⏎            ~$ 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### Severity\n\nWe rate the severity as medium because the following reasons make it hard to replay tokens without the patch:\u0010\n\n- TLS protects against MITM which makes it difficult to intercept valid tokens for replay attacks\n- The expiry time of the JWT gives only a short window of opportunity where it could be replayed\n\n### Patches\n\nThis will be patched with v1.4.0+oryOS.17\n\n### Workarounds\n\nTwo workarounds have been identified:\n\n- Do not allow clients to use `private_key_jwt`\n- Use short expiry times for the JWTs\n\n### References\n\nhttps://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication\n\n### Upstream\n\nThis issue will be resolved in the upstream repository https://github.com/ory/fosite","status":"published","published":"2021-05-27T18:43:22Z","modified":"2026-07-08T06:28:27.094037366Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-294"],"updated_at":"2026-11-02T15:46:35.747385Z"},{"id":"GO-2022-0786","title":"Authentication Bypass in hydra in github.com/ory/hydra","description":"Authentication Bypass in hydra in github.com/ory/hydra","status":"published","published":"2024-08-21T15:28:59Z","modified":"2026-03-03T04:52:15.851817Z","updated_at":"2026-11-02T15:47:00.918515Z"}]}}
