CVE Database›Document archive›CVE-2025-22868

CVE-2025-22868

golang.org/x/oauth2/jws: Unexpected memory consumption during token parsing in golang.org/x/oauth2/jws

Loading…

Severity

Important

Red Hat Product Security

7.5

CVSS 3.1

Review impact separately from score.

Published · February 26, 2025

Updated · November 4, 2026

Description

A flaw was found in the golang.org/x/oauth2/jws package in the token parsing component. This vulnerability is made possible because of the use of strings.Split(token, ".") to split JWT tokens, which can lead to excessive memory consumption when processing maliciously crafted tokens with a large number of . characters. An attacker could exploit this functionality by sending numerous malformed tokens and can trigger memory exhaustion and a Denial of Service.

Statement

IMPORTANT impact: CVE-2025-22868 affects Red Hat product components that use golang.org/x/oauth2/jws, including components across Red Hat Enterprise Linux, OpenShift, cloud, management, Ansible, Ceph, and other Red Hat products. An unauthenticated remote attacker can submit a maliciously crafted token containing a large number of '.' characters; parsing with strings.Split(token, ".") can consume excessive memory, causing memory exhaustion and denial of service. The current record contains 659 affected component entries, with component-level delegated outcomes including AFFECTED, NOTAFFECTED, WONTFIX, and OOSS; entries classified as NOTAFFECTED are therefore component-specific, and this record provides no more specific product-level justification for those classifications. The CVSS 3.1 score of 7.5 (IMPORTANT) reflects network reachability and a high availability impact, with no confidentiality or integrity impact.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To mitigate this vulnerability, it is recommended to pre-validate any payloads passed to go-jose to check that they do not contain an excessive amount of . characters.

CVSS / CWE

CVSS 3.1 · 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CWE-1286 · Improper Validation of Syntactic Correctness of Input