CVE-2016-9121: Gopkg.in/square/go jose.v1 Elliptic Curve Key Disclosure Vulnerability
CRITICALCVE-2016-9121 is a CRITICAL (CVSS 9.1) elliptic curve key disclosure vulnerability (CWE-326: Inadequate Encryption Strength) affecting Gopkg.in/square/go jose.v1 libraries in the Go ecosystem. The issue involves elliptic curve key disclosure in go-jose. Remediation is available by upgrading affected packages to version 1.0.4.
CVE-2016-9121 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2016-9121
To remediate this vulnerability, upgrade all affected Gopkg.in/square/go jose.v1 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 gopkg.in/square/go-jose.v1 to 1.0.4
Upgrade github.com/square/go-jose to 1.0.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for gopkg.in/square/go-jose.v1
How to Check if You Are Affected
To determine whether your application is affected by CVE-2016-9121, inspect your project dependencies for Gopkg.in/square/go jose.v1:
inspect dependencies for gopkg.in/square/go-jose.v1
Analyze the terminal output to locate any version of Gopkg.in/square/go jose.v1 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.4), 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-326: Inadequate Encryption Strength, where the product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required. In Gopkg.in/square/go jose.v1, 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-2016-9121 Affected Gopkg.in/square/go jose.v1 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gopkg.in/square/go-jose.v1
|
Go |
< 1.0.4
|
1.0.4
|
|
github.com/square/go-jose
|
Go |
< 1.0.4
|
1.0.4
|
References
Frequently Asked Questions
What is CVE-2016-9121?
Which Gopkg.in/square/go jose.v1 versions are affected?
What version fixes CVE-2016-9121?
Is gopkg.in/square/go-jose.v1 affected?
Is github.com/square/go-jose affected?
What is the CVSS score of CVE-2016-9121?
What CWE is associated with CVE-2016-9121?
How can I check Go dependencies for CVE-2016-9121?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-86r9-39j9-99wp",
"modified" : "2021-05-20T16:54:50Z",
"published" : "2021-06-23T17:17:52Z",
"aliases" : [ "CVE-2016-9121" ],
"summary" : "Elliptic Curve Key Disclosure in go-jose",
"details" : "go-jose before 1.0.4 suffers from an invalid curve attack for the ECDH-ES algorithm. When deriving a shared key using ECDH-ES for an encrypted message, go-jose neglected to check that the received public key on a message is on the same curve as the static private key of the receiver, thus making it vulnerable to an invalid curve attack.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "gopkg.in/square/go-jose.v1"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/square/go-jose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-9121"
}, {
"type" : "WEB",
"url" : "https://github.com/square/go-jose/commit/c7581939a3656bb65e89d64da0a52364a33d2507"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/164590"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2020-0010"
}, {
"type" : "WEB",
"url" : "https://www.openwall.com/lists/oss-security/2016/11/03/1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-326" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-20T16:54:50Z",
"nvd_published_at" : null
}
}