6.6medium
Go JOSE's Parsing Vulnerable to Denial of Service
- Severity
- 6.6medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.40% (higher than 35% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-c6gw-w398-hv78GO-2025-3485
Description
Go JOSE provides an implementation of the Javascript Object Signing and Encryption set of standards in Go, including support for JSON Web Encryption (JWE), JSON Web Signature (JWS), and JSON Web Token (JWT) standards. In versions on the 4.x branch prior to version 4.0.5, when parsing compact JWS or JWE input, Go JOSE could use excessive memory. The code used strings.Split(token, ".") to split JWT tokens, which is vulnerable to excessive memory consumption when processing maliciously crafted tokens with a large number of `.` characters. An attacker could exploit this by sending numerous malformed tokens, leading to memory exhaustion and a Denial of Service. Version 4.0.5 fixes this issue. As a workaround, applications could pre-validate that payloads passed to Go JOSE do not contain an excessive number of `.` characters.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| go-jose go-jose | >= 4.0.0, < 4.0.5 | CVE List |
| github.com/go-jose/go-jose/v4 (Go) | before 4.0.5 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/go-jose/go-jose/v3 (Go) | before 3.0.4 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/go-jose/go-jose (Go) | before 3.0.4, all versions | GitHub Advisory Database, Go Vulnerability Database |
| github.com/square/go-jose (Go) | all versions | Go Vulnerability Database |
All scores
| GitHub_M | 6.6medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
Classification
What each source says
CVE List
Go JOSE provides an implementation of the Javascript Object Signing and Encryption set of standards in Go, including support for JSON Web Encryption (JWE), JSON Web Signature (JWS), and JSON Web Token (JWT) standards. In versions on the 4.x branch prior to version 4.0.5, when parsing compact JWS or JWE input, Go JOSE could use excessive memory. The code used strings.Split(token, ".") to split JWT tokens, which is vulnerable to excessive memory consumption when processing maliciously crafted tokens with a large number of `.` characters. An attacker could exploit this by sending numerous malformed tokens, leading to memory exhaustion and a Denial of Service. Version 4.0.5 fixes this issue. As a workaround, applications could pre-validate that payloads passed to Go JOSE do not contain an excessive number of `.` characters.
GitHub Advisory Database
Impact
When parsing compact JWS or JWE input, go-jose could use excessive memory. The code used strings.Split(token, ".") to split JWT tokens, which is vulnerable to excessive memory consumption when processing maliciously crafted tokens with a large number of '.' characters. An attacker could exploit this by sending numerous malformed tokens, leading to memory exhaustion and a Denial of Service.
Patches
Version 4.0.5 fixes this issue
Workarounds
Applications could pre-validate payloads passed to go-jose do not contain an excessive number of '.' characters.
References
This is the same sort of issue as in the golang.org/x/oauth2/jws package as CVE-2025-22868 and Go issue https://go.dev/issue/71490.
Go Vulnerability Database
DoS in go-jose Parsing in github.com/go-jose/go-jose
NVD (es)
Go JOSE proporciona una implementación del conjunto de estándares de firma y cifrado de objetos Javascript en Go, que incluye compatibilidad con los estándares de cifrado web JSON (JWE), firma web JSON (JWS) y token web JSON (JWT). En las versiones de la rama 4.x anteriores a la versión 4.0.5, al analizar la entrada compacta JWS o JWE, Go JOSE podía utilizar memoria excesiva. El código utilizaba strings.Split(token, ".") para dividir tokens JWT, lo que es vulnerable al consumo excesivo de memoria al procesar tokens creados de forma malintencionada con una gran cantidad de caracteres ".". Un atacante podría aprovechar esto enviando numerosos tokens malformados, lo que provocaría el agotamiento de la memoria y una denegación de servicio. La versión 4.0.5 corrige este problema. Como workaround, las aplicaciones podrían validar previamente que los payloads pasados a Go JOSE no contengan una cantidad excesiva de caracteres ".".
References
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-27144 changed 2025-02-25 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-c6gw-w398-hv78 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-3485 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2025-27144 changed 2026-06-17 | Public domain |