---
id: "CVE-2026-116586"
kind: "vulnerability"
aliases: ["CVE-2026-116586"]
title: "Go JOSE: deeply nested JSON crashes apps that parse untrusted tokens"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["backend-services", "go", "jose", "jwt", "package"]
not_affected_if: ["no-untrusted-json", "pinned-4.1.5-or-later"]
published_at: "2026-10-26T22:16:55+00:00"
first_seen_at: "2026-10-26T22:25:33+00:00"
updated_at: "2026-10-26T22:27:49+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116586", "first_seen_at": "2026-10-26T22:25:33+00:00"}]
---

# Go JOSE: deeply nested JSON crashes apps that parse untrusted tokens

go-jose, a Go library for JWE, JWS and JWT, overflows the stack when parsing attacker-controlled JSON with deeply nested arrays or objects. The resulting crash lets an attacker cause denial of service in applications that parse untrusted JSON through it.

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

## How to check

- Run `go list -m github.com/go-jose/go-jose/v4` in the project to see the go-jose version in use
- Run `go list -m all | grep go-jose` to find indirect copies pulled in by other dependencies

## Fix

- Upgrade go-jose to `4.1.5` or later with `go get github.com/go-jose/go-jose/v4@v4.1.5` then `go mod tidy`

## Timeline

- 2026-10-26T22:25:33+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116586

## From the sources

Go JOSE provides an implementation of the Javascript Object Signing and Encryption set of standards in Go, including support for JSON Web Encryption (JWE), JSON Web Signature (JWS), and JSON Web Token (JWT) standards. Prior to 4.1.5, parsing attacker-controlled JSON through go-jose allows deeply nested arrays or objects to exceed Go's stack limit. The resulting stack overflow crashes the application and permits denial of service in applications that parse untrusted JSON through go-jose. This issue is fixed in version 4.1.5.

---

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