CVE-2026-78661

NameCVE-2026-78661
DescriptionWhen 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
golang-golang-x-net (PTS)bookworm1:0.7.0+dfsg-1vulnerable
trixie1:0.27.0-2vulnerable
forky, sid1:0.61.0-1vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
golang-golang-x-netsource(unstable)(unfixed)

Notes

https://groups.google.com/g/golang-announce/c/sqrs2vTx_Xs
https://github.com/golang/go/issues/82224
Fixed by: https://github.com/golang/net/commit/4af4fce62e93c5621a316363718b9dc78fbb0355 (v0.62.0)

Search for package or bug name: Reporting problems