VDB
Sign up
MEDIUM5.3

GO-2025-4010

Insufficient validation of bracketed IPv6 hostnames in net/url

Quick fix

GO-2025-4010 — stdlib: upgrade to the fixed version with the command below.

go get stdlib@v1.24.8

Details

The Parse function permits values other than IPv6 addresses to be included in square brackets within the host component of a URL. RFC 3986 permits IPv6 addresses to be included within the host component, enclosed within square brackets. For example: "http://[::1]/". IPv4 addresses and hostnames must not appear within square brackets. Parse did not enforce this requirement.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/stdlib
Introduced in: 0Fixed in: 1.24.8
Fixgo get stdlib@v1.24.8

References