{"id":"GO-2026-6860","revision":"0bb46537b04f44b8a0c224d67613520c","records":[{"revision":"0bb46537b04f44b8a0c224d67613520c","observedAt":"2026-10-27T21:48:52.964+00:00","statement":{"source":"osv","id":"GO-2026-6860","aliases":["CVE-2026-78661"],"title":"Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net","description":"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</x>\") caused O(n^2) allocations and byte copies.\n\nAccumulate coalesced text in per-node byte slices during parsing and materialize Data strings once at the end of parse.","state":0,"publishedAt":"2026-10-27T21:16:18+00:00","modifiedAt":"2026-10-27T21:30:04.8908091+00:00","affected":[{"ecosystem":"Go","name":"golang.org/x/net","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.62.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://go.dev/cl/849365","https://go.dev/issue/82224","https://groups.google.com/g/golang-announce/c/sqrs2vTx_Xs"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6860","license":"OSV · upstream source license applies","key":"osv:GO-2026-6860","identifiers":["GO-2026-6860","CVE-2026-78661"]},"retained":false,"historicalAffected":[]}],"coverage":[]}