Vulnerability · Published Mar 21, 2025 · Assigned by GitHub_M

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

High 7.5

In plain English

A high-severity security flaw in jwt from golang-jwt. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 57% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.8%top 42.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:10grafana10.2.6-15.el10_0ALSA-2025:7475
AlmaLinux:9grafana10.2.6-11.el9_6ALSA-2025:7404
AlmaLinux:9grafana10.2.6-9.el9_5ALSA-2025:3344
AlmaLinux:10grafana-selinux10.2.6-15.el10_0ALSA-2025:7475
AlmaLinux:9grafana-selinux10.2.6-11.el9_6ALSA-2025:7404
AlmaLinux:9grafana-selinux10.2.6-9.el9_5ALSA-2025:3344
AlmaLinux:8osbuild-composer101-3.el8_10.alma.1ALSA-2025:7967
AlmaLinux:9osbuild-composer118.2-1.el9_5.alma.1ALSA-2025:4669
AlmaLinux:9osbuild-composer132.2-1.el9_6.alma.1ALSA-2025:7425
AlmaLinux:8osbuild-composer-core101-3.el8_10.alma.1ALSA-2025:7967
AlmaLinux:9osbuild-composer-core132.2-1.el9_6.alma.1ALSA-2025:7425
AlmaLinux:9osbuild-composer-core118.2-1.el9_5.alma.1ALSA-2025:4669
AlmaLinux:8osbuild-composer-worker101-3.el8_10.alma.1ALSA-2025:7967
AlmaLinux:9osbuild-composer-worker132.2-1.el9_6.alma.1ALSA-2025:7425
AlmaLinux:9osbuild-composer-worker118.2-1.el9_5.alma.1ALSA-2025:4669
Alpine:v3.22rclone1.69.3-r0ALPINE-CVE-2025-30204
Alpine:v3.23rclone1.69.3-r0ALPINE-CVE-2025-30204
Alpine:v3.24rclone1.69.3-r0ALPINE-CVE-2025-30204
Debian:12golang-github-golang-jwt-jwtno fix listedDEBIAN-CVE-2025-30204
Debian:13golang-github-golang-jwt-jwt5.0.0+really4.5.2-1DEBIAN-CVE-2025-30204
Debian:14golang-github-golang-jwt-jwt5.0.0+really4.5.2-1DEBIAN-CVE-2025-30204
Debian:13golang-github-golang-jwt-jwt-v55.2.2-1DEBIAN-CVE-2025-30204
Debian:14golang-github-golang-jwt-jwt-v55.2.2-1DEBIAN-CVE-2025-30204
Gogithub.com/golang-jwt/jwtno fix listedGHSA-mh63-6h87-95cp
Gogithub.com/golang-jwt/jwtno fix listedGO-2025-3553
Gogithub.com/golang-jwt/jwt/v44.5.2GHSA-mh63-6h87-95cp
Gogithub.com/golang-jwt/jwt/v44.5.2GO-2025-3553
Gogithub.com/golang-jwt/jwt/v55.2.2GO-2025-3553
Gogithub.com/golang-jwt/jwt/v55.2.2GHSA-mh63-6h87-95cp
Rocky Linux:9grafana0:10.2.6-9.el9_5RLSA-2025:3344
Rocky Linux:10opentelemetry-collector0:0.107.0-9.el10_0RLSA-2025:7479
Rocky Linux:9opentelemetry-collector0:0.107.0-10.el9_5RLSA-2025:3411
Rocky Linux:8osbuild-composer0:101-3.el8_10.rocky.0.6RLSA-2025:7967
Ubuntu:22.04:LTSgolang-github-golang-jwt-jwtno fix listedUBUNTU-CVE-2025-30204
Ubuntu:24.04:LTSgolang-github-golang-jwt-jwtno fix listedUBUNTU-CVE-2025-30204
Ubuntu:24.04:LTSgolang-github-golang-jwt-jwt-v5no fix listedUBUNTU-CVE-2025-30204

Affected products (as reported)

VendorProductVersions
golang-jwt jwt >= 3.2.0, < 4.5.2>= 5.0.0-rc.1, < 5.2.2

Weakness: CWE-405 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References