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.
Published: 2026-10-27
Score: n/a
EPSS: n/a
KEV: No
Impact: Denial of Service via resource exhaustion
Action: Patch
AI Analysis

Impact

The vulnerability resides in golang.org/x/net's HTML parsing package. When the parser merges adjacent text nodes, it appends to existing TextNode data with repeated string concatenation (n.Data += text). On each token this reallocates and copies the entire accumulated string, resulting in quadratic time and space consumption. Crafting input with many short text fragments separated by ignored end tags triggers O(n²) allocations and copies, leading to excessive CPU and memory usage.

Affected Systems

Any Go program that imports golang.org/x/net/html for parsing or rendering HTML may be impacted. The CVE does not specify a particular version; therefore, all releases containing the unpatched logic are susceptible.

Risk and Exploitability

The lack of published CVSS or EPSS scores and absence from CISA KEV indicate no known exploit details; however, the quadratic processing can be exploited by feeding large amounts of text. Exfiltration requires the attacker to provide input to the parser, which might be possible remotely if the application accepts user‑controlled HTML, or locally via scripts. It is inferred that supplying such input could overwhelm the parser, resulting in service degradation or crash. The risk is considered high due to the potential for resource exhaustion.

Generated by OpenCVE AI on October 27, 2026 at 23:04 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update golang.org/x/net to a version that implements byte‑slice accumulation for text nodes
  • If an upgrade is not immediately possible, enforce a maximum input size or reject requests containing an unusually large number of text fragments before they reach the parser
  • Monitor CPU and memory usage of processes that parse HTML and apply throttling or canary deployment to detect resource exhaustion incidents

Generated by OpenCVE AI on October 27, 2026 at 23:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 27 Oct 2026 23:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-770

Tue, 27 Oct 2026 21:45:00 +0000

Type Values Removed Values 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.
Title Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: Go

Published:

Updated: 2026-10-27T21:38:56.517Z

Reserved: 2026-08-24T23:36:15.738Z

Link: CVE-2026-78661

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-27T22:18:05.930

Modified: 2026-10-27T22:18:05.930

Link: CVE-2026-78661

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-27T23:15:07Z

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling