All vulnerabilities

Go

CVE-2026-78661

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

Severity
High 7.5
Published
27 Oct 2026
Last changed
4 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
0.62.0
Exploit chance
0.5% in the next 30 daysHigher than 42% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Inefficient algorithmic complexity (CWE-407)
Attack
Over the network · No login needed · No user action needed
Attacker can
Read data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Sources
CVE Program

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") 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.

From the CVE Program.

Affected software

SoftwareAffected versions
golang.org/x/net/htmlGo · osv:Go:golang.org/x/net/html
  • Every version before 0.62.0

About golang.org/x/net/html

Vulnerabilities in golang.org/x/net/html

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
1
Known exploited
0
Search the list for golang.org/x/net/html

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-78661