Vulnerabilities in pkg:golang/github.com/ory/fosite
PACKAGECVE-2020-15222 is a HIGH (CVSS 8.1) token reuse vulnerability (CWE-287: Improper Authentication) affecting Github.com/ory/fosite libraries in the Go ecosystem. The issue involves token reuse in ory fosite. Remediation is available by upgrading affected packages to version 0.31.0.
pkg:golang/github.com/ory/fosite
Vulnerability advisories affecting package pkg:golang/github.com/ory/fosite. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-v3q9-2p3m-7g43 | CVE-2020-15222 | HIGH | Token reuse in Ory fosite |
| GHSA-7mqr-2v3q-v2wm | CVE-2020-15223 | HIGH | Ory fosite contains Improper Handling of Exceptional Conditions |
| GHSA-grfp-q2mm-hfp6 | CVE-2020-15234 | MODERATE | Redirect URL matching ignores character casing |
| GHSA-rfq3-w54c-f9q5 | CVE-2020-15233 | MODERATE | OAuth2 Redirect URL validity does not respect query parameters and character casing for loopback addresses |
CVE-2020-15222 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2020-15222
To remediate this vulnerability, upgrade all affected Github.com/ory/fosite dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/ory/fosite to 0.31.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ory/fosite
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-15222, inspect your project dependencies for Github.com/ory/fosite:
inspect dependencies for github.com/ory/fosite
Analyze the terminal output to locate any version of Github.com/ory/fosite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.31.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Github.com/ory/fosite, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-15222 Affected Github.com/ory/fosite Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ory/fosite
|
Go |
< 0.31.0
|
0.31.0
|
References
Frequently Asked Questions
What is CVE-2020-15222?
Which Github.com/ory/fosite versions are affected?
What version fixes CVE-2020-15222?
Is github.com/ory/fosite affected?
What is the CVSS score of CVE-2020-15222?
What CWE is associated with CVE-2020-15222?
How can I check Go dependencies for CVE-2020-15222?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v3q9-2p3m-7g43",
"modified" : "2023-08-29T23:07:22Z",
"published" : "2021-05-24T16:57:52Z",
"aliases" : [ "CVE-2020-15222" ],
"summary" : "Token reuse in Ory fosite",
"details" : "### 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> 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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ory/fosite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.31.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ory/fosite/security/advisories/GHSA-v3q9-2p3m-7g43"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15222"
}, {
"type" : "WEB",
"url" : "https://github.com/ory/fosite/commit/0c9e0f6d654913ad57c507dd9a36631e1858a3e9"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ory/fosite"
}, {
"type" : "WEB",
"url" : "https://github.com/ory/fosite/releases/tag/v0.31.0"
}, {
"type" : "WEB",
"url" : "https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2021-0110"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287", "CWE-345" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-24T12:52:00Z",
"nvd_published_at" : "2020-09-24T17:15:00Z"
}
}