CVE-2025-30204jwt-go allows excessive memory allocation during header parsing
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | golang-github-golang-jwt-jwt | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | golang-github-golang-jwt-jwt-v5 | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | golang-github-golang-jwt-jwt | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | golang-github-golang-jwt-jwt-v5 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | golang-github-golang-jwt-jwt | Under investigation | UBUNTU-CVE-2025-30204 | |
| Ubuntu 24.04 | golang-github-golang-jwt-jwt-v5 | Under investigation | UBUNTU-CVE-2025-30204 | |
| Ubuntu 22.04 | golang-github-golang-jwt-jwt | Under investigation | UBUNTU-CVE-2025-30204 | |
| Debian 14 | golang-github-golang-jwt-jwt | Fixed | 5.0.0+really4.5.2-1 | DEBIAN-CVE-2025-30204 |
| Debian 14 | golang-github-golang-jwt-jwt-v5 | Fixed | 5.2.2-1 | DEBIAN-CVE-2025-30204 |
| Debian 13 | golang-github-golang-jwt-jwt | Fixed | 5.0.0+really4.5.2-1 | DEBIAN-CVE-2025-30204 |
| Debian 13 | golang-github-golang-jwt-jwt-v5 | Fixed | 5.2.2-1 | DEBIAN-CVE-2025-30204 |
| Debian 12 | golang-github-golang-jwt-jwt | Fix pending | DEBIAN-CVE-2025-30204 | |
| Red Hat Enterprise Linux 10 | grafana | Fixed | 0:10.2.6-15.el10_0 | RHSA-2025:7475 |
| Red Hat Enterprise Linux 10 | grafana-selinux | Fixed | 0:10.2.6-15.el10_0 | RHSA-2025:7475 |
| Red Hat Enterprise Linux 10 | opentelemetry-collector | Fixed | 0:0.107.0-9.el10_0 | RHSA-2025:7479 |
| Red Hat Enterprise Linux 10 | osbuild-composer | Fixed | 0:134.1-1.el10_0 | RHSA-2025:7503 |
| Red Hat Enterprise Linux 10 | osbuild-composer-core | Fixed | 0:134.1-1.el10_0 | RHSA-2025:7503 |
| Red Hat Enterprise Linux 10 | osbuild-composer-worker | Fixed | 0:134.1-1.el10_0 | RHSA-2025:7503 |
| Red Hat Enterprise Linux 9 | grafana | Fixed | 0:10.2.6-11.el9_6 | RHSA-2025:3344 |
| Red Hat Enterprise Linux 9 | grafana-selinux | Fixed | 0:10.2.6-11.el9_6 | RHSA-2025:3344 |
| Red Hat Enterprise Linux 9 | opentelemetry-collector | Fixed | 0:0.107.0-10.el9_5 | RHSA-2025:7407 |
| Red Hat Enterprise Linux 9 | osbuild-composer | Fixed | 0:132.2-1.el9_6 | RHSA-2025:4669 |
| Red Hat Enterprise Linux 9 | osbuild-composer-core | Fixed | 0:132.2-1.el9_6 | RHSA-2025:4669 |
| Red Hat Enterprise Linux 9 | osbuild-composer-worker | Fixed | 0:118.2-1.el9_5 | RHSA-2025:7425 |
| Red Hat Enterprise Linux 8 | osbuild-composer | Fixed | 0:101-3.el8_10 | RHSA-2025:7967 |
| Red Hat Enterprise Linux 8 | osbuild-composer-core | Fixed | 0:101-3.el8_10 | RHSA-2025:7967 |
| Red Hat Enterprise Linux 8 | osbuild-composer-worker | Fixed | 0:101-3.el8_10 | RHSA-2025:7967 |
| AlmaLinux 10 | grafana | Fixed | 10.2.6-15.el10_0 | ALSA-2025:7475 |
| AlmaLinux 10 | grafana-selinux | Fixed | 10.2.6-15.el10_0 | ALSA-2025:7475 |
| AlmaLinux 9 | grafana | Fixed | 10.2.6-11.el9_6 | ALSA-2025:3344 |
| AlmaLinux 9 | grafana-selinux | Fixed | 10.2.6-9.el9_5 | ALSA-2025:7404 |
| AlmaLinux 9 | osbuild-composer | Fixed | 118.2-1.el9_5.alma.1 | ALSA-2025:7425 |
| AlmaLinux 9 | osbuild-composer-core | Fixed | 118.2-1.el9_5.alma.1 | ALSA-2025:7425 |
| AlmaLinux 9 | osbuild-composer-worker | Fixed | 118.2-1.el9_5.alma.1 | ALSA-2025:7425 |
| AlmaLinux 8 | osbuild-composer | Fixed | 101-3.el8_10.alma.1 | ALSA-2025:7967 |
| AlmaLinux 8 | osbuild-composer-core | Fixed | 101-3.el8_10.alma.1 | ALSA-2025:7967 |
| AlmaLinux 8 | osbuild-composer-worker | Fixed | 101-3.el8_10.alma.1 | ALSA-2025:7967 |
| Rocky Linux 10 | opentelemetry-collector | Fixed | 0:0.107.0-9.el10_0 | RLSA-2025:7479 |
| Rocky Linux 9 | grafana | Fixed | 0:10.2.6-9.el9_5 | RLSA-2025:3344 |
| Rocky Linux 9 | opentelemetry-collector | Fixed | 0:0.107.0-10.el9_5 | RLSA-2025:3411 |
| Rocky Linux 8 | osbuild-composer | Fixed | 0:101-3.el8_10.rocky.0.6 | RLSA-2025:7967 |
| Alpine Linux 3.24 | rclone | Fixed | 1.69.3-r0 | ALPINE-CVE-2025-30204 |
| Alpine Linux 3.23 | rclone | Fixed | 1.69.3-r0 | ALPINE-CVE-2025-30204 |
| Alpine Linux 3.22 | rclone | Fixed | 1.69.3-r0 | ALPINE-CVE-2025-30204 |
| Go library | github.com/golang-jwt/jwt | Fix pending | GHSA-mh63-6h87-95cp | |
| Go library | github.com/golang-jwt/jwt/v4 | Fixed | 4.5.2 | GHSA-mh63-6h87-95cp |
| Go library | github.com/golang-jwt/jwt/v5 | Fixed | 5.2.2 | GO-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.
- golang-jwt jwt: affected: >= 3.2.0, < 4.5.2, >= 5.0.0-rc.1, < 5.2.2
References
- https://github.com/golang-jwt/jwt/security/advisories/GHSA-mh63-6h87-95cp
- https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3
- https://github.com/golang-jwt/jwt/commit/bf316c48137a1212f8d0af9288cc9ce8e59f1afb
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.