CVE-2025-22868 Unexpected memory consumption during token parsing in golang.org/x/oauth2
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.
| Package | Affected | Fixed in |
|---|---|---|
golang.org/x/oauth2 Go | All versions | 0.27.0 |
golang.org/x/oauth2 Go | All versions | 0.27.0 |
golang.org/x/oauth2 Go | All versions | 0.27.0 |
Linux distribution packages (34)
ignition SUSE:Linux Enterprise Micro 5.1 | All versions | 2.14.0-150300.4.13.1 |
ignition SUSE:Linux Enterprise Micro 5.2 | All versions | 2.14.0-150300.6.13.1 |
ignition SUSE:Linux Enterprise Micro 5.3 | All versions | 2.14.0-150400.4.9.1 |
ignition SUSE:Linux Enterprise Micro 5.4 | All versions | 2.15.0-150400.4.11.1 |
google-guest-agent SUSE:Linux Enterprise Micro 5.5 | All versions | 20250116.00-150000.1.57.1 |
google-osconfig-agent SUSE:Linux Enterprise Micro 5.5 | All versions | 20250115.01-150000.1.47.1 |
ignition SUSE:Linux Enterprise Micro 5.5 | All versions | 2.17.0-150500.3.12.1 |
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 3.6-6.43.1 |
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 20250116.00-1.47.2 |
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 20250115.01-1.38.1 |
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP3 | All versions | 3.6-150100.3.44.1 |
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP3 | All versions | 20250116.00-150000.1.57.1 |
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP3 | All versions | 20250115.01-150000.1.47.1 |
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 3.6-150100.3.44.1 |
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 20250116.00-150000.1.57.1 |
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 20250115.01-150000.1.47.1 |
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 3.6-150100.3.44.1 |
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 20250116.00-150000.1.57.1 |
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 20250115.01-150000.1.47.1 |
google-cloud-sap-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 3.6-150100.3.44.1 |
google-guest-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 20250116.00-150000.1.57.1 |
google-osconfig-agent SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 20250115.01-150000.1.47.1 |
restic SUSE:Package Hub 15 SP6 | All versions | 0.17.3-bp156.2.3.1 |
google-cloud-sap-agent openSUSE:Leap 15.6 | All versions | 3.6-150100.3.44.1 |
google-guest-agent openSUSE:Leap 15.6 | All versions | 20250116.00-150000.1.57.1 |
google-osconfig-agent openSUSE:Leap 15.6 | All versions | 20250115.01-150000.1.47.1 |
restic openSUSE:Leap 15.6 | All versions | 0.17.3-bp156.2.3.1 |
cadvisor openSUSE:Tumbleweed | All versions | 0.52.1-1.1 |
fake-gcs-server openSUSE:Tumbleweed | All versions | 1.52.2-1.1 |
go-containerregistry openSUSE:Tumbleweed | All versions | 0.20.3-2.1 |
google-guest-agent openSUSE:Tumbleweed | All versions | 20250116.00-3.1 |
google-osconfig-agent openSUSE:Tumbleweed | All versions | 20250115.01-3.1 |
pluto openSUSE:Tumbleweed | All versions | 5.21.7-1.1 |
restic openSUSE:Tumbleweed | All versions | 0.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.