CVE-2026-78661

high

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.

References

https://pkg.go.dev/vuln/GO-2026-6860

https://groups.google.com/g/golang-announce/c/sqrs2vTx_Xs

https://go.dev/issue/82224

https://go.dev/cl/849365

https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-111399

Details

Source: Mitre, NVD

Published: 2026-10-27

Updated: 2026-10-28

Named Vulnerability: GO-2026-6860Named Vulnerability: GHSA-75pg-wvh3-34jr

Risk Information

CVSS v2

Base Score: 7.8

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:N/A:N

Severity: High

CVSS v3

Base Score: 7.5

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Severity: High

EPSS

EPSS: 0.00185