Live threats

All CVEs / golang-jwt

CVE-2025-30204golang-jwt jwt

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
—
Auth required
No
Published
Mar 21, 2025
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-405
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

golang-jwt is a Go implementation of JSON Web Tokens. Starting in version 3.2.0 and prior to versions 5.2.2 and 4.5.2, the function parse.ParseUnverified 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. This issue is fixed in 5.2.2 and 4.5.2.

Original NVD text.

What to do

  1. Apply the vendor's security update for jwt.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Go github.com/golang-jwt/jwt ≥ 3.2.0 ≤ 3.2.2 no fixed version —
Go github.com/golang-jwt/jwt all no fixed version —
Go github.com/golang-jwt/jwt/v4 < 4.5.2 4.5.2 go get github.com/golang-jwt/jwt/v4@v4.5.2
Go github.com/golang-jwt/jwt/v4 < 4.5.2 4.5.2 go get github.com/golang-jwt/jwt/v4@v4.5.2
Go github.com/golang-jwt/jwt/v5 ≥ 5.0.0-rc.1 < 5.2.2 5.2.2 go get github.com/golang-jwt/jwt/v5@v5.2.2
Go github.com/golang-jwt/jwt/v5 ≥ 5.0.0-rc.1 < 5.2.2 5.2.2 go get github.com/golang-jwt/jwt/v5@v5.2.2

Per OSV / GitHub Advisories (GHSA-mh63-6h87-95cp, GO-2025-3553). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official advisories

Also: Red Hat (+15), SUSE (+11)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.