GHSA-c6gw-w398-hv78

Suggest an improvement
Source
https://github.com/advisories/GHSA-c6gw-w398-hv78
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/02/GHSA-c6gw-w398-hv78/GHSA-c6gw-w398-hv78.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-c6gw-w398-hv78
Aliases
Related
Published
2025-02-24T22:49:19Z
Modified
2025-03-03T16:29:21.937733Z
Severity
  • 6.9 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
DoS in go-jose Parsing
Details

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.

Database specific
{
    "nvd_published_at": "2025-02-24T23:15:11Z",
    "cwe_ids": [
        "CWE-400",
        "CWE-770"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2025-02-24T22:49:19Z"
}
References

Affected packages

Go / github.com/go-jose/go-jose/v4

Package

Name
github.com/go-jose/go-jose/v4
View open source insights on deps.dev
Purl
pkg:golang/github.com/go-jose/go-jose/v4

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.0.5

Go / github.com/go-jose/go-jose/v3

Package

Name
github.com/go-jose/go-jose/v3
View open source insights on deps.dev
Purl
pkg:golang/github.com/go-jose/go-jose/v3

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.4

Go / github.com/go-jose/go-jose

Package

Name
github.com/go-jose/go-jose
View open source insights on deps.dev
Purl
pkg:golang/github.com/go-jose/go-jose

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.4