---
id: "CVE-2026-89320"
kind: "vulnerability"
aliases: ["CVE-2026-89320"]
title: "gose: JWE integrity tag ignored message, so ciphertext is unauthenticated"
severity: "high"
cvss: 8.8
epss: 0.00174
exploited: false
status: "open"
category: "package"
products: [{"name": "github.com/ThalesGroup/gose", "fixed": [], "affected": ">= 0.9.0, <= 0.13.0-rc1", "ecosystem": "go"}, {"name": "github.com/eclipse-keypont/gose", "fixed": ["1.0.0-rc1"], "affected": "none", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["cbc-hmac", "go", "gose", "jose", "jwe", "package"]
not_affected_if: ["aead-gcm-only", "does-not-use-gose", "eclipse-keypont-module-path", "no-aes-cbc-hmac-jwe"]
published_at: "2026-10-23T09:17:08+00:00"
first_seen_at: "2026-10-23T21:57:32+00:00"
updated_at: "2026-10-24T07:15:51+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-89320", "first_seen_at": "2026-10-23T21:57:32+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-10-23T23:36:34+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-89320", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# gose: JWE integrity tag ignored message, so ciphertext is unauthenticated

gose's HmacShaCryptor.Hash never hashed its input (misused hash.Sum), so every AES-CBC-HMAC JWE tag equals HMAC_K(""), constant per key. An attacker who has seen one valid JWE can reuse its tag on any ciphertext, so bit-flipping and padding-oracle attacks become possible. Only the CBC-HMAC direct path is affected; AEAD/GCM is not. Affected: github.com/ThalesGroup/gose v0.9.0 to v0.13.0-rc1. Fixed in commit 97f9348, shipped only as github.com/eclipse-keypont/gose >= v1.0.0-rc1.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/ThalesGroup/gose affected >= 0.9.0, <= 0.13.0-rc1 fixed ?
- go:github.com/eclipse-keypont/gose affected none fixed 1.0.0-rc1

## How to check

grep go.mod/go.sum for github.com/ThalesGroup/gose (any version v0.9.0 through v0.13.0-rc1 is affected; v0.7.3 to v0.8.7 are not). Then grep the code for NewJweDirectEncryptorBlock / NewJweDirectDecryptorBlock: if you only use the Aead variants you are not exploitable. Command: go list -m all | grep -i gose

## Fix

go get -u will NOT fix this. Change the module path: replace github.com/ThalesGroup/gose v0.13.0-rc1 with github.com/eclipse-keypont/gose v1.0.0-rc3 (v1.0.0-rc1 is the first fixed release) and rewrite all import paths. Workaround: switch to the AEAD/GCM path (NewJweDirectEncryptorAead / NewJweDirectDecryptorAeadImpl). Treat tokens made by affected versions as unauthenticated and re-issue/re-encrypt them.

## Timeline

- 2026-10-23T21:57:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-89320
- 2026-10-23T23:36:34+00:00 analyst — Read vendor GHSA-h6w5-722x-2h3m and CVE record. Fix only under new module path eclipse-keypont/gose >= v1.0.0-rc1; ThalesGroup/gose has no patched release. No exploitation seen; reproducer test is in the advisory. Did not search social posts (niche library).
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-89320

## Documents

- [advisory] GHSA-h6w5-722x-2h3m: HmacShaCryptor.Hash never hashes its input (eclipse-keypont/gose) https://github.com/eclipse-keypont/gose/security/advisories/GHSA-h6w5-722x-2h3m
- [describes] CVE Record: CVE-2026-89320 https://www.cve.org/CVERecord?id=CVE-2026-89320
- [fix] GHSA-h6w5-722x-2h3m: HmacShaCryptor.Hash never hashes its input (eclipse-keypont/gose) https://github.com/eclipse-keypont/gose/security/advisories/GHSA-h6w5-722x-2h3m

## From the sources

`HmacShaCryptor.Hash` never hashed its input. For any input it returned `HMAC_K("")` — the MAC of the empty message under the key. Every AES-CBC-HMAC JWE produced or verified by gose therefore carried an authentication tag that is constant per key and independent of the message, removing ciphertext integrity entirely.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
