Skip to content

GO-2026-6860 CVE-2026-78661

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

Not rated yet Go
Severity
Not rated yet
No source has published a CVSS score yet
Exploit chance (EPSS)
0.18%
Chance of exploitation in the next 30 days. Higher than 8.07% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
—
Not classified
Fix
0.62.0
Upgrade golang.org/x/net to this version or later

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 versions

Go

PackageVulnerableFixed in
golang.org/x/net
< 0.62.0
0.62.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

golang.org/x/net Go → 0.62.0

go
go get golang.org/x/net@v0.62.0 && go mod tidy

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-4374-p667-p6c8
HTTP/2 rapid reset can cause excessive work in net/http
High Known exploited Also affects golang.org/x/net
GHSA-qppj-fm5r-hxr3
HTTP/2 Stream Cancellation Attack
Medium Known exploited Also affects golang.org/x/net
GO-2026-6866
Check all ancestor namespace transitions when rendering raw text in html in golang.org/x/net
Not rated yet Also affects golang.org/x/net
GO-2026-6617
HTTP/2 server crash due to HPACK encoder race in net/http
High Also affects golang.org/x/net
GO-2026-6612
Double flow control refund on HTTP/2 server streams in net/http
Critical Also affects golang.org/x/net
GO-2026-6611
Excessive CPU consumption from repeated initial window changes in net/http
High Also affects golang.org/x/net
GO-2026-6610
HTTP/2 transport accepts malformed framing-related headers in net/http
High Also affects golang.org/x/net
GO-2026-6603
HTTP/2 server memory exhaustion due to Trailer headers in net/http
High Also affects golang.org/x/net

Credits: Markus Magnuson

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor