GHSA-2c7c-3mj9-8fqh: Github.com/go jose/go jose/v3 Remote Code Execution Vulnerability
MODERATEGHSA-2c7c-3mj9-8fqh is a MODERATE remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/go jose/go jose/v3 libraries in the Go ecosystem. The issue involves decryption of malicious pbes2 jwe objects can consume unbounded system resources. Remediation is available by upgrading affected packages to version 3.0.1, 2.6.2.
GHSA-2c7c-3mj9-8fqh at a Glance
How to Fix GHSA-2c7c-3mj9-8fqh
To remediate this vulnerability, upgrade all affected Github.com/go jose/go jose/v3 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/go-jose/go-jose/v3 to 3.0.1
Upgrade github.com/square/go-jose to 2.6.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/go-jose/go-jose/v3
How to Check if You Are Affected
To determine whether your application is affected by GHSA-2c7c-3mj9-8fqh, inspect your project dependencies for Github.com/go jose/go jose/v3:
inspect dependencies for github.com/go-jose/go-jose/v3
Analyze the terminal output to locate any version of Github.com/go jose/go jose/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.1), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/go jose/go jose/v3, 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
GHSA-2c7c-3mj9-8fqh Affected Github.com/go jose/go jose/v3 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/go-jose/go-jose/v3
|
Go |
< 3.0.1
|
3.0.1
|
|
github.com/square/go-jose
|
Go |
< 2.6.2
|
2.6.2
|
References
Frequently Asked Questions
What is GHSA-2c7c-3mj9-8fqh?
Which Github.com/go jose/go jose/v3 versions are affected?
What version fixes GHSA-2c7c-3mj9-8fqh?
Is github.com/go-jose/go-jose/v3 affected?
Is github.com/square/go-jose affected?
What CWE is associated with GHSA-2c7c-3mj9-8fqh?
How can I check Go dependencies for GHSA-2c7c-3mj9-8fqh?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2c7c-3mj9-8fqh",
"modified" : "2024-05-20T21:57:47Z",
"published" : "2023-11-21T22:17:19Z",
"aliases" : [ ],
"summary" : "Decryption of malicious PBES2 JWE objects can consume unbounded system resources",
"details" : "The go-jose package is subject to a \"billion hashes attack\" causing denial-of-service when decrypting JWE inputs. This occurs when an attacker can provide a PBES2 encrypted JWE blob with a very large p2c value that, when decrypted, produces a denial-of-service.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-jose/go-jose/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/square/go-jose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.6.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/go-jose/go-jose/issues/64"
}, {
"type" : "WEB",
"url" : "https://github.com/go-jose/go-jose/commit/65351c27657d58960c2e6c9fbb2b00f818e50568"
}, {
"type" : "WEB",
"url" : "https://github.com/go-jose/go-jose/commit/a3d307244c3bc50b25a71aa0688764c32ec419c7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/go-jose/go-jose"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-11-21T22:17:19Z",
"nvd_published_at" : null
}
}