Skip to content

← Actionable
High, CVSS 8.7

jwt-go allows excessive memory allocation during header parsing

CVE-2025-30204GHSA-mh63-6h87-95cp

What to do

Partial vendor fix. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • Go github.com/golang-jwt/jwt

    Affected
    >= 3.2.0, <= 3.2.2
    Fixed in
    no fixed version recorded
  • Go github.com/golang-jwt/jwt/v5

    Affected
    >= 5.0.0-rc.1, < 5.2.2
    Fixed in
    5.2.2
  • Go github.com/golang-jwt/jwt/v4

    Affected
    < 4.5.2
    Fixed in
    4.5.2

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
8.7 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N · score source
EPSS
  • CVE-2025-30204: 0.81% estimated exploitation activity in the next 30 days; percentile 56.99 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary Function parse.ParseUnverified currently splits (via a call to strings.Split) its argument (which is untrusted data) on periods. As a result, in the face of a malicious request whose Authorization header consists of Bearer followed by many period characters, a call to that function incurs allocations to the tune of O(n) bytes (where n stands for the length of the function's argument), with a constant factor of about 16. Relevant weakness: CWE-405: Asymmetric Resource Consumption (Amplification) Details See parse.ParseUnverified Impact Excessive memory allocation

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-mh63-6h87-95cp

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2025-30204

Advisory: jwt-go allows excessive memory allocation during header parsing
IDs: CVE-2025-30204, GHSA-mh63-6h87-95cp
Record: https://patchnext.com/advisories/cve-2025-30204 (revision 1, source checked 26 Oct 2026, 15:09 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 8.7)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Partial vendor fix; fixed versions by package: github.com/golang-jwt/jwt/v5 5.2.2; github.com/golang-jwt/jwt/v4 4.5.2. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/golang-jwt/jwt: affected >= 3.2.0, <= 3.2.2
- Go github.com/golang-jwt/jwt/v5: affected >= 5.0.0-rc.1, < 5.2.2; fixed in 5.2.2
- Go github.com/golang-jwt/jwt/v4: affected < 4.5.2; fixed in 4.5.2

## Suggested inspection (read-only)
- Go github.com/golang-jwt/jwt: check the installed version with your package manager.
- Go github.com/golang-jwt/jwt/v5: check the installed version with your package manager.
- Go github.com/golang-jwt/jwt/v4: check the installed version with your package manager.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/golang-jwt/jwt, github.com/golang-jwt/jwt/v5, github.com/golang-jwt/jwt/v4.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-mh63-6h87-95cp (GitHub-reviewed advisory GHSA-mh63-6h87-95cp lists affected ranges: Go github.com/golang-jwt/jwt/v5 >=5.0.0-rc.1 =0 =3.2.0 <=3.2.2)

Commands are suggestions: review each one before running it.

Loading voting…