CVE-2026-97045 (GO-2026-6866) is a cross-site-scripting flaw in golang.org/x/net/html's renderer, fixed in golang.org/x/net v0.62.0 by commit 3de643d (CL 855121, issue golang/go#82622).\n\nRoot cause: The internal helper childTextNodesAreLiteral(n *Node) in html/render.go determines whether the text children of raw-text elements (style, script, xmp, iframe, noembed, noframes, noscript, plaintext) can be written out literally. Per the HTML spec this is only safe when those elements are in the HTML namespace after re-parsing. The old implementation walked up the ancestor chain looking for the nearest node with a non-empty namespace; once it found one it checked htmlIntegrationPoint and then immediately break-ed. This early stop meant it never inspected namespace transitions higher in the tree. An attacker can craft markup such as <math><mtext><table><mglyph><svg><desc><style><img src=x onerror=alert(1)> where an HTML integration point (e.g. <desc>) is itself a descendant of an element that the parser foster-parents into a foreign namespace (<mglyph>/<malignmark> under <mtext>). On re-parse the subtree resolves into a different foreign namespace, so the text that was emitted literally (unescaped) is instead interpreted as markup, yielding XSS in the rendered output.\n\nFix: replace the early-break loop with a full walk of the ancestor chain, requiring that every transition out of a non-empty namespace happens at an HTML integration point before treating child text as literal (the diff changes for p := n.Parent; p != nil; p = p.Parent { if p.Namespace != "" { if !htmlIntegrationPoint(p) { return false }; break } } into for c, p := n, n.Parent; p != nil; c, p = p, p.Parent { if p.Namespace != "" && p.Namespace != c.Namespace && !htmlIntegrationPoint(p) { return false } }). The render_test.go change adds regression cases for the fostered-foreign-content scenarios.\n\nThe function that was modified and that contains the missing validation is childTextNodesAreLiteral. The rendering entry point Render (and its internal helpers render/render1, which call childTextNodesAreLiteral) are the runtime frames seen during exploitation; the official advisory names Render as the affected symbol. Since this is Go, profiler-visible names are the bare function names (package path stripped).