CVE-2025-22870: Golang.org/x/net HTTP Proxy Bypass Using IPv6 Vulnerability

MODERATE
Advisory Identifier: GHSA-qxp5-gwg8-xv66
CVSS 4.4
CWE-115 CWE-20
Published
Advisory Summary

CVE-2025-22870 is a MODERATE (CVSS 4.4) http proxy bypass using ipv6 vulnerability (CWE-115: Misinterpretation of Input) affecting Golang.org/x/net libraries in the Go ecosystem. The issue involves http proxy bypass using ipv6 zone ids in golang.org/x/net. Remediation is available by upgrading affected packages to version 0.36.0.

CVE-2025-22870 at a Glance

CVE Identifier CVE-2025-22870
GHSA Identifier GHSA-qxp5-gwg8-xv66
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-115: Misinterpretation of Input
Affected Product Golang.org/x/net
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2025-22870

To remediate this vulnerability, upgrade all affected Golang.org/x/net dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

golang.org/x/net fixed: 0.36.0
Upgrade golang.org/x/net to 0.36.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for golang.org/x/net

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-22870, inspect your project dependencies for Golang.org/x/net:

inspect dependencies for golang.org/x/net

Analyze the terminal output to locate any version of Golang.org/x/net in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.36.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-115: Misinterpretation of Input, where the product misinterprets an input, whether from an attacker or another product, in a security-relevant fashion. In Golang.org/x/net, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Matching of hosts against proxy patterns can improperly treat an IPv6 zone ID as a hostname component. For example, when the NO_PROXY environment variable is set to "*.example.com", a request to "[::1%25.example.com]:80` will incorrectly match and not be proxied.

CVE-2025-22870 Affected Golang.org/x/net Versions

1 component(s)
Fixed Versions:
0.36.0
Product / Package Ecosystem Affected Versions Fixed Version
golang.org/x/net
Go
< 0.36.0
0.36.0

References

Frequently Asked Questions

What is CVE-2025-22870?
CVE-2025-22870 is a security vulnerability in Golang.org/x/net involving HTTP Proxy bypass using IPv6 Zone IDs in golang.org/x/net under CWE-115: Misinterpretation of Input.
Which Golang.org/x/net versions are affected?
Affected versions include releases prior to 0.36.0 across affected packages: golang.org/x/net.
What version fixes CVE-2025-22870?
Upgrading to 0.36.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is golang.org/x/net affected?
Yes, golang.org/x/net is affected in releases prior to 0.36.0. Upgrade your dependency to 0.36.0 or later.
What is the CVSS score of CVE-2025-22870?
CVE-2025-22870 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L.
What CWE is associated with CVE-2025-22870?
CVE-2025-22870 is classified under CWE-115: Misinterpretation of Input (The product misinterprets an input, whether from an attacker or another product, in a security-relevant fashion.).
How can I check Go dependencies for CVE-2025-22870?
Run the dependency tree command: 'inspect dependencies for golang.org/x/net'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qxp5-gwg8-xv66",
  "modified" : "2026-04-24T20:36:12Z",
  "published" : "2025-03-12T22:06:40Z",
  "aliases" : [ "CVE-2025-22870" ],
  "summary" : "HTTP Proxy bypass using IPv6 Zone IDs in golang.org/x/net",
  "details" : "Matching of hosts against proxy patterns can improperly treat an IPv6 zone ID as a hostname component. For example, when the NO_PROXY environment variable is set to \"*.example.com\", a request to \"[::1%25.example.com]:80` will incorrectly match and not be proxied.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "golang.org/x/net"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.36.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-22870"
  }, {
    "type" : "PACKAGE",
    "url" : "https://go-review.googlesource.com/q/project:net"
  }, {
    "type" : "WEB",
    "url" : "https://go.dev/cl/654697"
  }, {
    "type" : "WEB",
    "url" : "https://go.dev/issue/71984"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/golang-announce/c/4t3lzH3I0eI/m/b42ImqrBAQAJ"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2025-3503"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20250509-0007"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/03/07/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-115", "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-12T22:06:40Z",
    "nvd_published_at" : "2025-03-12T19:15:38Z"
  }
}