CVE-2026-78661: Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net
Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net
Other sources
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.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/golang-golang-x-netto a version that resolves this vulnerability.Fixed in 1:0.62.0-1 - Upgrade
Upgrade
azurelinux/daselto a version that resolves this vulnerability.Fixed in 2.8.1-6 - Upgrade
Upgrade
azurelinux/kube-vip-cloud-providerto a version that resolves this vulnerability.Fixed in 0.0.10-12 - Upgrade
Upgrade
azurelinux/cri-toolsto a version that resolves this vulnerability.Fixed in 1.32.0-11 - Upgrade
Upgrade
azurelinux/ghto a version that resolves this vulnerability.Fixed in 2.102.0-3 - Upgrade
Upgrade
azurelinux/telegrafto a version that resolves this vulnerability.Fixed in 1.31.0-37 - Upgrade
Upgrade
azurelinux/application-gateway-kubernetes-ingressto a version that resolves this vulnerability.Fixed in 1.7.7-8 - Upgrade
Upgrade
azurelinux/cloud-provider-kubevirtto a version that resolves this vulnerability.Fixed in 0.5.1-11 - Upgrade
Upgrade
azurelinux/sriov-network-device-pluginto a version that resolves this vulnerability.Fixed in 3.7.0-10 - Upgrade
Upgrade
azurelinux/kubevirtto a version that resolves this vulnerability.Fixed in 1.8.4-5 - Upgrade
Upgrade
azurelinux/docker-buildxto a version that resolves this vulnerability.Fixed in 0.14.0-20 - Upgrade
Upgrade
azurelinux/docker-composeto a version that resolves this vulnerability.Fixed in 2.27.0-17 - Upgrade
Upgrade
azurelinux/telegrafto a version that resolves this vulnerability.Fixed in 1.31.0-38
Event History
Frequently Asked Questions
What kind of inputs can trigger the excessive resource use?
Inputs with many short text runs separated by ignored end tags, such as repeated patterns resembling "a</x>", can trigger quadratic allocations and byte copying during HTML parsing.
What impact should operators expect from exploitation?
The issue causes excessive CPU and memory work while parsing crafted HTML because the accumulated text was repeatedly reallocated and copied. The provided data does not describe impacts beyond this parsing-time resource consumption.
Is an application exposed only if it parses attacker-controlled HTML?
The described trigger requires crafted HTML to be parsed. Applications that do not parse untrusted or externally supplied HTML would not have an attacker-controlled path to supply the triggering input based on the available information.