Vulnerability · Published Feb 26, 2025 · Assigned by Go

CVE-2025-22868Unexpected memory consumption during token parsing in golang.org/x/oauth2

High 7.5

In plain English

A high-severity security flaw in golang.org/x/oauth2/jws from golang.org/x/oauth2. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 59% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.9%top 41.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

An attacker can pass a malicious malformed token which causes unexpected memory to be consumed during parsing.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12golang-golang-x-oauth2no fix listedDEBIAN-CVE-2025-22868
Debian:13golang-golang-x-oauth20.27.0-1DEBIAN-CVE-2025-22868
Debian:14golang-golang-x-oauth20.27.0-1DEBIAN-CVE-2025-22868
Gogolang.org/x/oauth20.27.0GO-2025-3488
Gogolang.org/x/oauth20.27.0GHSA-6v2p-p543-phr9
Rocky Linux:10opentelemetry-collector0:0.107.0-9.el10_0RLSA-2025:7479
Ubuntu:22.04:LTSgolang-golang-x-oauth2no fix listedUBUNTU-CVE-2025-22868
Ubuntu:24.04:LTSgolang-golang-x-oauth2no fix listedUBUNTU-CVE-2025-22868
Ubuntu:25.10golang-golang-x-oauth2no fix listedUBUNTU-CVE-2025-22868
Ubuntu:26.04:LTSgolang-golang-x-oauth2no fix listedUBUNTU-CVE-2025-22868
Ubuntu:26.10golang-golang-x-oauth2no fix listedUBUNTU-CVE-2025-22868

Affected products (as reported)

VendorProductVersions
golang.org/x/oauth2 golang.org/x/oauth2/jws 0 – before 0.27.0

Weakness: CWE-1286 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References