# jwt-go allows excessive memory allocation during header parsing

Advisory record · `GHSA-mh63-6h87-95cp`

- **Identifiers:** `GHSA-mh63-6h87-95cp` · `CVE-2025-30204` · `GO-2025-3553`
- **State:** Confirmed
- **Severity:** CVSS 7.5 High
- **Critical:** No
- **Weakness (CWE):** [CWE-405](https://cwe.mitre.org/data/definitions/405.html)
- **Tags:** [CWE-405](https://agentprime.io/advisories/tag/cwe-405.md)
- **Published:** 21 Mar 2025
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 21 Mar 2025, 22:04 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `github.com/golang-jwt/jwt/v5` (Go): affected `>=5.0.0-rc.1, <5.2.2`; fixed in `5.2.2`
- `github.com/golang-jwt/jwt/v4` (Go): affected `<4.5.2`; fixed in `4.5.2`
- `github.com/golang-jwt/jwt` (Go): affected `>=3.2.0, <=3.2.2`; no fixed version yet

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> The jwt-go library (Go packages github.com/golang-jwt/jwt/v5 from 5.0.0-rc.1 before 5.2.2, github.com/golang-jwt/jwt/v4 before 4.5.2, and github.com/golang-jwt/jwt before 3.2.2 for the 3.2.x line) allocates memory in proportion to the length of an untrusted token during header parsing. A remote attacker can send a request whose Authorization header contains many period characters after "Bearer" to cause excessive memory allocation. Upgrade to v5.2.2 or v4.5.2; the source lists no fixed version for github.com/golang-jwt/jwt.

Written 1 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 7.5 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0081, the 57th percentile, on 6 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:14 UTC: First seen by agentprime
- 31 Oct 2026, 14:14 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-mh63-6h87-95cp)

## Sources

- [GitHub Advisory Database: GHSA-mh63-6h87-95cp](https://github.com/advisories/GHSA-mh63-6h87-95cp)
- [OSV: GHSA-mh63-6h87-95cp](https://osv.dev/vulnerability/GHSA-mh63-6h87-95cp)
- <https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-30204>
- <https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3>
- <https://github.com/golang-jwt/jwt/commit/bf316c48137a1212f8d0af9288cc9ce8e59f1afb>
- <https://github.com/golang-jwt/jwt>
- <https://security.netapp.com/advisory/ntap-20250404-0002>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-mh63-6h87-95cp>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-mh63-6h87-95cp/>. Everything for agents: <https://agentprime.io/llms.txt>.
