CVE-2025-30204

jwt-go allows excessive memory allocation during header parsing

Published Mar 21, 2025 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-7207 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.
Github GHSA Github GHSA GHSA-mh63-6h87-95cp jwt-go allows excessive memory allocation during header parsing
History
Type Values Removed Values Added
Metrics epss

{'score': 0.00025}

epss

{'score': 0.00027}

Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.15::el9
Type Values Removed Values Added
First Time appeared Redhat openshift Api Data Protection
CPEs cpe:/a:redhat:openshift_api_data_protection:1.3::el9
Vendors & Products Redhat openshift Api Data Protection
Type Values Removed Values Added
CPEs cpe:/a:redhat:multicluster_globalhub:1.2::el9
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift_distributed_tracing:3.6::el8
Type Values Removed Values Added
First Time appeared Redhat rhmt
CPEs cpe:/a:redhat:acm:2.13::el9
cpe:/a:redhat:acm:2.9::el8
cpe:/a:redhat:openshift_data_foundation:4.15::el9
cpe:/a:redhat:openshift_data_foundation:4.16::el9
cpe:/a:redhat:rhmt:1.8::el8
Vendors & Products Redhat rhmt
Type Values Removed Values Added
First Time appeared Redhat multicluster Globalhub
CPEs cpe:/a:redhat:multicluster_engine:2.4::el8
cpe:/a:redhat:multicluster_globalhub:1.4::el9
Vendors & Products Redhat multicluster Globalhub
Type Values Removed Values Added
First Time appeared Redhat rhel E4s
CPEs cpe:/a:redhat:openshift_gitops:1.14::el8
cpe:/a:redhat:rhel_e4s:9.0
Vendors & Products Redhat rhel E4s
Type Values Removed Values Added
First Time appeared Redhat openshift Devspaces
CPEs cpe:/a:redhat:openshift_devspaces:3::el9
Vendors & Products Redhat openshift Devspaces
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift_data_foundation:4.17::el9
cpe:/a:redhat:rhel_eus:8.8
Type Values Removed Values Added
CPEs cpe:/a:redhat:enterprise_linux:8
Type Values Removed Values Added
First Time appeared Redhat openshift Gitops
CPEs cpe:/a:redhat:openshift:4.13::el8
cpe:/a:redhat:openshift_gitops:1.15::el8
Vendors & Products Redhat openshift Gitops
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10.0
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.12::el8
Type Values Removed Values Added
CPEs cpe:/a:redhat:acm:2.11::el9
Type Values Removed Values Added
First Time appeared Redhat multicluster Engine
Redhat openshift Data Foundation
CPEs cpe:/a:redhat:acm:2.10::el9
cpe:/a:redhat:multicluster_engine:2.5::el8
cpe:/a:redhat:openshift_data_foundation:4.18::el9
Vendors & Products Redhat multicluster Engine
Redhat openshift Data Foundation
Type Values Removed Values Added
First Time appeared Redhat acm
CPEs cpe:/a:redhat:acm:2.12::el9
Vendors & Products Redhat acm
Type Values Removed Values Added
First Time appeared Redhat openshift Builds
CPEs cpe:/a:redhat:openshift_builds:1.2::el9
cpe:/a:redhat:openshift_builds:1.3::el9
Vendors & Products Redhat openshift Builds
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.16::el9
Type Values Removed Values Added
First Time appeared Redhat openshift Custom Metrics Autoscaler
CPEs cpe:/a:redhat:openshift_custom_metrics_autoscaler:2.15::el9
Vendors & Products Redhat openshift Custom Metrics Autoscaler
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.15::el8
Type Values Removed Values Added
First Time appeared Redhat logging
CPEs cpe:/a:redhat:logging:5.9::el9
cpe:/a:redhat:logging:6.0::el9
cpe:/a:redhat:logging:6.1::el9
Vendors & Products Redhat logging
Type Values Removed Values Added
First Time appeared Redhat advanced Cluster Security
CPEs cpe:/a:redhat:advanced_cluster_security:4.5::el8
cpe:/a:redhat:advanced_cluster_security:4.6::el8
cpe:/a:redhat:advanced_cluster_security:4.7::el8
Vendors & Products Redhat advanced Cluster Security
Type Values Removed Values Added
First Time appeared Redhat trusted Artifact Signer
CPEs cpe:/a:redhat:openshift:4.18::el9
cpe:/a:redhat:trusted_artifact_signer:1.1::el9
Vendors & Products Redhat trusted Artifact Signer
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.14::el8
Type Values Removed Values Added
Description golang-jwt is a Go implementation of JSON Web Tokens. Prior to 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. 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.
References
Type Values Removed Values Added
First Time appeared Redhat openshift
CPEs cpe:/a:redhat:openshift:4.17::el9
Vendors & Products Redhat openshift
Type Values Removed Values Added
First Time appeared Redhat rhel Eus
CPEs cpe:/a:redhat:rhel_eus:9.2
cpe:/a:redhat:rhel_eus:9.4
Vendors & Products Redhat rhel Eus
Type Values Removed Values Added
First Time appeared Redhat openshift Distributed Tracing
CPEs cpe:/a:redhat:openshift_distributed_tracing:3.5::el8
Vendors & Products Redhat openshift Distributed Tracing
Type Values Removed Values Added
First Time appeared Redhat cryostat
CPEs cpe:/a:redhat:cryostat:4::el9
Vendors & Products Redhat cryostat
Type Values Removed Values Added
First Time appeared Redhat
Redhat enterprise Linux
CPEs cpe:/a:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description golang-jwt is a Go implementation of JSON Web Tokens. Prior to 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.
Title jwt-go allows excessive memory allocation during header parsing
Weaknesses CWE-405
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}