GO-2026-6860

Source
https://pkg.go.dev/vuln/GO-2026-6860
Import Source
https://vuln.go.dev/ID/GO-2026-6860.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2026-6860
Aliases
  • CVE-2026-78661
Published
2026-10-27T21:16:18Z
Modified
2026-10-27T21:30:04Z
Summary
Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net
Details

When coalescing adjacent text nodes in addText and fosterParent, appending to an existing TextNode's Data via string concatenation (n.Data += text) reallocated and copied the accumulated string on every token. Inputs containing many short text runs separated by ignored end tags (such as "a") caused O(n^2) allocations and byte copies.

Accumulate coalesced text in per-node byte slices during parsing and materialize Data strings once at the end of parse.

Database specific
{
    "review_status":  "REVIEWED",
    "url":  "https://pkg.go.dev/vuln/GO-2026-6860"
}
References
Credits
    • Markus Magnuson

Affected packages

Go / golang.org/x/net

Package

Name
golang.org/x/net
View open source insights on deps.dev
Purl
pkg:golang/golang.org/x/net

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.62.0

Ecosystem specific

{
    "imports":  [
        {
            "path":  "golang.org/x/net/html",
            "symbols":  [
                "Parse",
                "ParseFragment",
                "ParseFragmentWithOptions",
                "ParseWithOptions",
                "parser.addText",
                "parser.fosterParent",
                "parser.parse"
            ]
        }
    ]
}

Database specific

source
"https://vuln.go.dev/ID/GO-2026-6860.json"