Categories
CVE-2020-5300

Vulnerability in github.com/ory/hydra (CVE-2020-5300)

Summary

Vulnerability in github.com/ory/hydra (CVE-2020-5300). Confidential information can be exposed externally. Exploitable via jti. Mitigation: upgrade to 1.4.0 or later.

Original description

The description as published by the source.

Impact

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 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:

$ curl --insecure --location --request POST 'https://localhost/_/oauth2/token' \
   --header 'Content-Type: application/x-www-form-urlencoded' \
   --data-urlencode 'grant_type=client_credentials' \
   --data-urlencode 'client_id=c001d00d-5ecc-beef-ca4e-b00b1e54a111' \
   --data-urlencode 'scope=application openid' \
   --data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \
   --data-urlencode 'client_assertion=eyJhb [...] jTw'
{"access_token":"zeG0NoqOtlACl8q5J6A-TIsNegQRRUzqLZaYrQtoBZQ.VR6iUcJQYp3u_j7pwvL7YtPqGhtyQe5OhnBE2KCp5pM","expires_in":3599,"scope":"application openid","token_type":"bearer"}⏎            ~$ curl --insecure --location --request POST 'https://localhost/_/oauth2/token' \
   --header 'Content-Type: application/x-www-form-urlencoded' \
   --data-urlencode 'grant_type=client_credentials' \
   --data-urlencode 'client_id=c001d00d-5ecc-beef-ca4e-b00b1e54a111' \
   --data-urlencode 'scope=application openid' \…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2020-5300 has been found in github.com/ory/hydra.
Attackers can target a specific entry point like jti over the network to misuse the product.
Confidential information can be exposed externally.
What to do: upgrade github.com/ory/hydra to 1.4.0 or later.
If unsure, ask your IT team or search "github.com/ory/hydra CVE-2020-5300" on the vendor's site.

CVE-2020-5300 (github.com/ory/hydra) — CWE-294
Attack vector: remote (network-reachable)
Attack surface: jti / private_key_jwt
Patched: 1.4.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-294) exists in github.com/ory/hydra. Attackers reach the vulnerable code path via jti.

📍 Affected scope

Check the vendor advisory for the affected versions of github.com/ory/hydra. Attack surface: jti / private_key_jwt.

🔥 Severity

Severity: ?. Confidential information can be exposed externally.

🔧 How to fix

Update to 1.4.0.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'github.com/ory/hydra' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'github.com/ory/hydra' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で github.com/ory/hydra を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade github.com/ory/hydra to 1.4.0

    ステージング環境で 1.4.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

Go github.com/ory/hydra
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.4.0"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details