CVE-2026-78661
JSON

7.5high

Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net

Severity
7.5high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.48% (higher than 43% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Go
Also known as
GO-2026-6860

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. Accumulate coalesced text in per-node byte slices during parsing and materialize Data strings once at the end of parse.

Affected

Product or packageVersionsReported by
golang.org/x/net/htmlbefore 0.62.0CVE List
golang.org/x/net (Go)before 0.62.0Go Vulnerability Database

Classification

CWE-407

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-78661 changed 2026-11-04CVE Terms of Use
Go Vulnerability DatabaseGO-2026-6860 changed 2026-10-27CC-BY-4.0
NVDCVE-2026-78661 changed 2026-11-04Public domain