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

High 7.5 Published Updated

An attacker can cause unexpected memory consumption and potential denial of service by sending a malformed token to applications using the Go OAuth2 library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-22868?

CVE-2025-22868 is a high-severity denial of service vulnerability in golang.org/x/oauth2/jws, published on 26 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

Weakness: CWE-1286

Which versions are affected by CVE-2025-22868?

3 open source packages ship an affected version, including golang.org/x/oauth2. It affects 1 product.

PackageAffectedFixed in
golang.org/x/oauth2 GoAll versions0.27.0
golang.org/x/oauth2 GoAll versions0.27.0
golang.org/x/oauth2 GoAll versions0.27.0
Linux distribution packages (34)
ignition SUSE:Linux Enterprise Micro 5.1All versions2.14.0-150300.4.13.1
ignition SUSE:Linux Enterprise Micro 5.2All versions2.14.0-150300.6.13.1
ignition SUSE:Linux Enterprise Micro 5.3All versions2.14.0-150400.4.9.1
ignition SUSE:Linux Enterprise Micro 5.4All versions2.15.0-150400.4.11.1
google-guest-agent SUSE:Linux Enterprise Micro 5.5All versions20250116.00-150000.1.57.1
google-osconfig-agent SUSE:Linux Enterprise Micro 5.5All versions20250115.01-150000.1.47.1
ignition SUSE:Linux Enterprise Micro 5.5All versions2.17.0-150500.3.12.1
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 12All versions3.6-6.43.1
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 12All versions20250116.00-1.47.2
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 12All versions20250115.01-1.38.1
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP3All versions3.6-150100.3.44.1
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP3All versions20250116.00-150000.1.57.1
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP3All versions20250115.01-150000.1.47.1
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP4All versions3.6-150100.3.44.1
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP4All versions20250116.00-150000.1.57.1
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP4All versions20250115.01-150000.1.47.1
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP5All versions3.6-150100.3.44.1
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP5All versions20250116.00-150000.1.57.1
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP5All versions20250115.01-150000.1.47.1
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP6All versions3.6-150100.3.44.1
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP6All versions20250116.00-150000.1.57.1
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP6All versions20250115.01-150000.1.47.1
restic SUSE:Package Hub 15 SP6All versions0.17.3-bp156.2.3.1
google-cloud-sap-agent openSUSE:Leap 15.6All versions3.6-150100.3.44.1
google-guest-agent openSUSE:Leap 15.6All versions20250116.00-150000.1.57.1
google-osconfig-agent openSUSE:Leap 15.6All versions20250115.01-150000.1.47.1
restic openSUSE:Leap 15.6All versions0.17.3-bp156.2.3.1
cadvisor openSUSE:TumbleweedAll versions0.52.1-1.1
fake-gcs-server openSUSE:TumbleweedAll versions1.52.2-1.1
go-containerregistry openSUSE:TumbleweedAll versions0.20.3-2.1
google-guest-agent openSUSE:TumbleweedAll versions20250116.00-3.1
google-osconfig-agent openSUSE:TumbleweedAll versions20250115.01-3.1
pluto openSUSE:TumbleweedAll versions5.21.7-1.1
restic openSUSE:TumbleweedAll versions0.17.3-2.1

Products include Go Jws.

How do I fix CVE-2025-22868?

Upgrade golang.org/x/oauth2 to 0.27.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-22868 being exploited?

There is no known exploitation of CVE-2025-22868 in the wild and no public exploit code.

Sources

Also known as AZL-57306, AZL-57309, AZL-57312, AZL-57315, AZL-57324, AZL-57335 and 163 more.

Is CVE-2025-22868 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free