Skip to content

net/url: reject IPv6 literal not at start of host (CVE-2026-25679) #77578

@jitsu-net

Description

@jitsu-net

The Go standard library function net/url.Parse insufficiently
validated the host/authority component and accepted some invalid URLs
by effectively treating garbage before an IP-literal as ignorable.
The function should have rejected this as invalid.

To prevent this behavior, net/url.Parse now rejects IPv6 literals
that do not appear at the start of the host subcomponent of a URL.

Thanks to Masaki Hara (https://github.com/qnighy) of Wantedly.

This is CVE-2026-25679 and https://go.dev/issue/77578.


This is a PRIVATE issue for CVE-2026-25679, tracked in http://b/477918287 and fixed by https://go-internal-review.git.corp.google.com/c/go/+/3400.

/cc @golang/security and @golang/release

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.NeedsFixThe path to resolution is known, but the work has not been done.Securityrelease-blocker

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions