0.0
NA
CVE-2026-78661
Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net
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.

INFO

Published Date :

Oct. 27, 2026, 10:18 p.m.

Last Modified :

Oct. 27, 2026, 10:18 p.m.

Remotely Exploit :

No
Affected Products

The following products are affected by CVE-2026-78661 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Golang net
Solution
Optimize text node handling to prevent quadratic memory allocations and copies during parsing.
  • Modify text accumulation to use byte slices.
  • Materialize Data strings only at parse end.
  • Review and optimize string concatenation logic.
  • Test parsing performance with various inputs.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-78661.

URL Resource
https://go.dev/cl/849365
https://go.dev/issue/82224
https://groups.google.com/g/golang-announce/c/sqrs2vTx_Xs
https://pkg.go.dev/vuln/GO-2026-6860
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-78661 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-78661 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-78661 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-78661 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • New CVE Received by [email protected]

    Oct. 27, 2026

    Action Type Old Value New Value
    Added 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.
    Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/78xxx/CVE-2026-78661.json">CVE-2026-78661</a>
    Added Reference https://go.dev/cl/849365
    Added Reference https://go.dev/issue/82224
    Added Reference https://groups.google.com/g/golang-announce/c/sqrs2vTx_Xs
    Added Reference https://pkg.go.dev/vuln/GO-2026-6860
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.