CVEfocus › CVE database › CVE-2025-30204

CVE-2025-30204jwt-go allows excessive memory allocation during header parsing

CVSS 7.5 HighEPSS 1.1% (higher than 65% of CVEs)Published 2025-03-21Updated 2025-04-10Assigner: GitHub_M

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.

CWE-405

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Go, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Debian, Go, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

38Fixed
2Fix pending
3Under investigation
4Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04golang-github-golang-jwt-jwtNot affected
vulnerable_code_not_present
Ubuntu 26.04golang-github-golang-jwt-jwt-v5Not affected
vulnerable_code_not_present
Ubuntu 25.10golang-github-golang-jwt-jwtNot affected
vulnerable_code_not_present
Ubuntu 25.10golang-github-golang-jwt-jwt-v5Not affected
vulnerable_code_not_present
Ubuntu 24.04golang-github-golang-jwt-jwtUnder investigationUBUNTU-CVE-2025-30204
Ubuntu 24.04golang-github-golang-jwt-jwt-v5Under investigationUBUNTU-CVE-2025-30204
Ubuntu 22.04golang-github-golang-jwt-jwtUnder investigationUBUNTU-CVE-2025-30204
Debian 14golang-github-golang-jwt-jwtFixed5.0.0+really4.5.2-1DEBIAN-CVE-2025-30204
Debian 14golang-github-golang-jwt-jwt-v5Fixed5.2.2-1DEBIAN-CVE-2025-30204
Debian 13golang-github-golang-jwt-jwtFixed5.0.0+really4.5.2-1DEBIAN-CVE-2025-30204
Debian 13golang-github-golang-jwt-jwt-v5Fixed5.2.2-1DEBIAN-CVE-2025-30204
Debian 12golang-github-golang-jwt-jwtFix pendingDEBIAN-CVE-2025-30204
Red Hat Enterprise Linux 10grafanaFixed0:10.2.6-15.el10_0RHSA-2025:7475
Red Hat Enterprise Linux 10grafana-selinuxFixed0:10.2.6-15.el10_0RHSA-2025:7475
Red Hat Enterprise Linux 10opentelemetry-collectorFixed0:0.107.0-9.el10_0RHSA-2025:7479
Red Hat Enterprise Linux 10osbuild-composerFixed0:134.1-1.el10_0RHSA-2025:7503
Red Hat Enterprise Linux 10osbuild-composer-coreFixed0:134.1-1.el10_0RHSA-2025:7503
Red Hat Enterprise Linux 10osbuild-composer-workerFixed0:134.1-1.el10_0RHSA-2025:7503
Red Hat Enterprise Linux 9grafanaFixed0:10.2.6-11.el9_6RHSA-2025:3344
Red Hat Enterprise Linux 9grafana-selinuxFixed0:10.2.6-11.el9_6RHSA-2025:3344
Red Hat Enterprise Linux 9opentelemetry-collectorFixed0:0.107.0-10.el9_5RHSA-2025:7407
Red Hat Enterprise Linux 9osbuild-composerFixed0:132.2-1.el9_6RHSA-2025:4669
Red Hat Enterprise Linux 9osbuild-composer-coreFixed0:132.2-1.el9_6RHSA-2025:4669
Red Hat Enterprise Linux 9osbuild-composer-workerFixed0:118.2-1.el9_5RHSA-2025:7425
Red Hat Enterprise Linux 8osbuild-composerFixed0:101-3.el8_10RHSA-2025:7967
Red Hat Enterprise Linux 8osbuild-composer-coreFixed0:101-3.el8_10RHSA-2025:7967
Red Hat Enterprise Linux 8osbuild-composer-workerFixed0:101-3.el8_10RHSA-2025:7967
AlmaLinux 10grafanaFixed10.2.6-15.el10_0ALSA-2025:7475
AlmaLinux 10grafana-selinuxFixed10.2.6-15.el10_0ALSA-2025:7475
AlmaLinux 9grafanaFixed10.2.6-11.el9_6ALSA-2025:3344
AlmaLinux 9grafana-selinuxFixed10.2.6-9.el9_5ALSA-2025:7404
AlmaLinux 9osbuild-composerFixed118.2-1.el9_5.alma.1ALSA-2025:7425
AlmaLinux 9osbuild-composer-coreFixed118.2-1.el9_5.alma.1ALSA-2025:7425
AlmaLinux 9osbuild-composer-workerFixed118.2-1.el9_5.alma.1ALSA-2025:7425
AlmaLinux 8osbuild-composerFixed101-3.el8_10.alma.1ALSA-2025:7967
AlmaLinux 8osbuild-composer-coreFixed101-3.el8_10.alma.1ALSA-2025:7967
AlmaLinux 8osbuild-composer-workerFixed101-3.el8_10.alma.1ALSA-2025:7967
Rocky Linux 10opentelemetry-collectorFixed0:0.107.0-9.el10_0RLSA-2025:7479
Rocky Linux 9grafanaFixed0:10.2.6-9.el9_5RLSA-2025:3344
Rocky Linux 9opentelemetry-collectorFixed0:0.107.0-10.el9_5RLSA-2025:3411
Rocky Linux 8osbuild-composerFixed0:101-3.el8_10.rocky.0.6RLSA-2025:7967
Alpine Linux 3.24rcloneFixed1.69.3-r0ALPINE-CVE-2025-30204
Alpine Linux 3.23rcloneFixed1.69.3-r0ALPINE-CVE-2025-30204
Alpine Linux 3.22rcloneFixed1.69.3-r0ALPINE-CVE-2025-30204
Go librarygithub.com/golang-jwt/jwtFix pendingGHSA-mh63-6h87-95cp
Go librarygithub.com/golang-jwt/jwt/v4Fixed4.5.2GHSA-mh63-6h87-95cp
Go librarygithub.com/golang-jwt/jwt/v5Fixed5.2.2GO-2025-3553

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.