Skip to content

GHSA-6v2p-p543-phr9 CVE-2025-22868 GO-2025-3488

golang.org/x/oauth2 Improper Validation of Syntactic Correctness of Input vulnerability

High Go
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.87%
Chance of exploitation in the next 30 days. Higher than 58.81% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-1286 Improper Validation of Syntactic Correctness of Input
Fix
0.27.0
Upgrade golang.org/x/oauth2 to this version or later

Description

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

Affected versions

Go

PackageVulnerableFixed in
golang.org/x/oauth2
< 0.27.0
0.27.0
golang.org/x/oauth2
< 0.27.0
0.27.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

golang.org/x/oauth2 Go → 0.27.0

go
go get golang.org/x/oauth2@v0.27.0 && go mod tidy

Severity breakdown

CVSS 3.1 7.5

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

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-1286: Improper Validation of Syntactic Correctness of Input

The product receives input that is expected to be well-formed - i.e., to comply with a certain syntax - but it does not validate or incorrectly validates that the input complies with the syntax.

How to prevent it
  • Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
EEF-CVE-2026-105660
Unvalidated HTTP/1 request-target authority lets a client choose conn.host and conn.port in Bandit
Not rated yet Same weakness, CWE-1286
GHSA-f52w-8j3h-j724
Traefik: Rootless HTTP/1 request-target routes as "/" but is forwarded verbatim, bypassing path-scoped routing, middleware guards and access logging
High Same weakness, CWE-1286
GHSA-6h8r-xr42-gp59
xmldom: Parser silently accepts a not-well-formed end tag whose name is followed by a line break and trailing content
Medium Same weakness, CWE-1286
GHSA-g2pf-xv49-m2h5
Rack::Request accepts invalid Host characters, enabling host allowlist bypass
Medium Same weakness, CWE-1286
GHSA-pq2q-rcw4-3hr6
NATS: Pre-auth remote server crash via WebSocket frame length overflow in wsRead
High Same weakness, CWE-1286
GHSA-vprv-35vv-q339
NATS has pre-auth server panic via leafnode handling
High Same weakness, CWE-1286
GO-2026-4601
Incorrect parsing of IPv6 host literals in net/url
High Same weakness, CWE-1286
GHSA-cjfx-qhwm-hf99
FacturaScripts has SQL Injection in API ORDER BY Clause
High Same weakness, CWE-1286

Credits: jub0bs

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor