Avoid quadratic complexity in resolvePath in net/url
Previously, resolving relative paths containing parent directory ('..') segments performed string conversions and buffer rewrites on each step, resulting in quadratic time complexity and high memory allocation overhead. Now, path resolution operates on a byte buffer using index-based backtracking for '..' segments, eliminating the quadratic time complexity and significantly reducing memory allocations.
- Products
- stdlib
- Affected versions
- Not specified
- Fixed versions
- 1.25.13, 1.26.6, 1.27.0-rc.3
- CVEs
- CVE-2026-56860
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 09:36 UTC · Revision 1
Source evidence
Avoid quadratic complexity in resolvePath in net/url
core-osv · Original sourcePublished 13 Aug 2026, 21:43 UTC
Previously, resolving relative paths containing parent directory ('..') segments performed string conversions and buffer rewrites on each step, resulting in quadratic time complexity and high memory allocation overhead. Now, path resolution operates on a byte buffer using index-based backtracking for '..' segments, eliminating the quadratic time complexity and significantly reducing memory allocations.
osv:GO-2026-6218
stdlib
Fixed versions: 1.25.13, 1.26.6, 1.27.0-rc.3
Complete source record
{
"id": "0bb7df498e2984b23efcdb2031d6c4e0efa804b0791ffd46814bb4dea49656ee",
"url": "https://osv.dev/vulnerability/GO-2026-6218",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Avoid quadratic complexity in resolvePath in net/url",
"summary": "Previously, resolving relative paths containing parent directory ('..') segments performed string conversions and buffer rewrites on each step, resulting in quadratic time complexity and high memory allocation overhead. Now, path resolution operates on a byte buffer using index-based backtracking for '..' segments, eliminating the quadratic time complexity and significantly reducing memory allocations.",
"evidence": "osv:GO-2026-6218",
"products": [
{
"name": {
"value": "stdlib",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.25.13",
"evidence": "/affected/0/ranges"
},
{
"value": "1.26.6",
"evidence": "/affected/0/ranges"
},
{
"value": "1.27.0-rc.3",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "GO-2026-6218",
"aliases": [
"BIT-golang-2026-56860",
"CVE-2026-56860",
"GO-2026-6218"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.25.13"
},
{
"introduced": "1.26.0-0"
},
{
"fixed": "1.26.6"
},
{
"introduced": "1.27.0-0"
},
{
"fixed": "1.27.0-rc.3"
}
]
}
],
"package": {
"name": "stdlib",
"purl": "pkg:golang/stdlib",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6218.json"
},
"ecosystem_specific": {
"imports": [
{
"path": "net/url",
"symbols": [
"URL.Parse",
"URL.ResolveReference",
"resolvePath"
]
}
]
}
}
],
"modified": "2026-10-20T10:42:24.481986669Z",
"provider": "osv",
"references": [
"https://go.dev/cl/803681",
"https://go.dev/issue/80494",
"https://groups.google.com/g/golang-announce/c/94pEornpRlI"
],
"provider_metadata": {
"url": "https://pkg.go.dev/vuln/GO-2026-6218",
"review_status": "REVIEWED"
}
},
"related_cves": [
{
"value": "CVE-2026-56860",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 379197,
"published_at": "2026-08-13T21:43:54+00:00"
}