CVE-2016-9121 · hackerone
CVE-2016-9121
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.
Published 2017-03-28, last changed 2026-06-17. Weakness: CWE-326.
How to fix
Upgrade to a fixed version: gopkg.in/square/go-jose.v1 1.0.4 (Go); github.com/square/go-jose 1.0.4 (Go). For the version that clears every advisory for your installed version, ask an agent for get_remediation.
Where the flaw is in the code
Fixed in square/go-jose by c7581939a3. Functions changed by the fix: DeriveECDHES, decryptKey, ecPublicKey. Regression tests: cipher/ecdh_es_test.go, asymmetric_test.go. Confidence: verified (a record names this commit as the fix, and it changed these functions).
Timeline
| 2017-03-28 | Published |
| 2021-04-14 | Package advisory GO-2020-0010 |
| 2021-06-23 | Package advisory GHSA-86r9-39j9-99wp |
| 2026-06-17 | Record last changed |
| 2026-11-30 | EPSS when our history starts: 1.41% |
| 2026-12-03 | Code-level analysis added |
Affected packages
| Advisory | Package | Fixed in |
|---|---|---|
| GHSA-86r9-39j9-99wp | gopkg.in/square/go-jose.v1 (Go) | 1.0.4 |
| GHSA-86r9-39j9-99wp | github.com/square/go-jose (Go) | 1.0.4 |
| GO-2020-0010 | github.com/square/go-jose (Go) | 1.0.4 |
Also known as: GHSA-86r9-39j9-99wp, GO-2020-0010
Credited: Quan Nguyen from Google's Information Security Engineering Team (other)
Related
| CVE | Published | CVSS | Summary |
|---|---|---|---|
| CVE-2016-9122 | 2017-03-28 | 7.5 | same package: gopkg.in/square/go-jose.v1 (Go) |
| CVE-2025-27144 | 2025-02-24 | 6.6 | Go JOSE's Parsing Vulnerable to Denial of Service |
| CVE-2016-9123 | 2017-03-28 | 7.5 | same package: github.com/square/go-jose (Go) |
| CVE-2023-28124 | 2023-04-19 | 5.5 | same weakness (CWE-326) from the same CNA (hackerone) |
| CVE-2023-23911 | 2023-03-10 | 7.5 | same weakness (CWE-326) from the same CNA (hackerone) |
Add it to your agent
One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.
claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp
Then ask for triage_cve CVE-2016-9121, or call /api/v1/vulnerabilities/CVE-2016-9121. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.