1. Home
  2. Vulnerabilities
  3. CVE-2026-78661

CVE-2026-78661

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

Published 27 Oct 2026 · modified 4 Nov 2026 · Sources: NVD, CNA (vendor or assigner), CERT-FR, EPSS (FIRST)

Medium 44/100

Summary

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 products and versions

golang.org/x/net (1 line(s))
golang.org/x/net
ProductVersionsFixed inSource
golang.org/x/net/html before 0.62.0 (excluded) — CNA (vendor or assigner)
Go (1 line(s))
Go
ProductVersionsFixed inSource
golang.org/x/net before 0.62.0 (excluded) 0.62.0 OSV

Fix

Upgrade — Go/golang.org/x/net 0.62.0official source

Source : OSV

Workaround

No workaround provided.

Check whether you are affected

No verification method provided.

Timeline

  1. — CVE published (cve)
  2. — CERT-FR advisory (certfr:CERTFR-2026-AVI-1486)

CERT-FR advisories

References

Data provenance

Status
NVD
Publication date
NVD
Description
CNA (vendor or assigner)
CVSS score
CNA (vendor or assigner)
Weakness (CWE)
CNA (vendor or assigner)
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N (CVSS 3.1, CNA:134c704f-9b21-4f2e-91b3-4a467353bcc0)
Weakness
CWE-407 · Autre (CWE-407)

How this data is obtained and calculated