CVE-2026-78661 Details
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.
A performance vulnerability has been identified in the Golang html package, specifically in versions prior to v0.62.0. The issue arises when coalescing adjacent text nodes, where appending data to a TextNode's Data property using string concatenation creates a quadratic complexity. This is because each concatenation reallocates and copies the entire string, leading to O(n^2) allocations and byte copies. The problem is exacerbated by inputs with many short text runs separated by ignored end tags, such as 'a</x>'.
Users can update to version v0.62.0 of the 'golang.org/x/net' package to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 27, 2026CISA-ADP
Assessed Nov 4, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://go.dev/cl/849365 | [email protected] | Source CodeVendor |
| https://go.dev/issue/82224 | [email protected] | Issue TrackingTechnical DescriptionVendor |
| https://groups.google.com/g/golang-announce/c/sqrs2vTx_Xs | [email protected] | Mailing ListRemedyVendor |
| https://pkg.go.dev/vuln/GO-2026-6860 | [email protected] | AdvisoryVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-407 | Inefficient Algorithmic Complexity | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| golang.org/x/net/html | < v0.62.0 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 4, 2026 | CVE Modified | CISA-ADP |
| Oct 27, 2026 | New CVE Received | [email protected] |
Volerion