---
id: "CVE-2026-97045"
kind: "vulnerability"
aliases: ["CVE-2026-97045", "GO-2026-6866"]
title: "Check all ancestor namespace transitions when rendering raw text in html in golang.org/x/net"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "golang.org/x/net", "fixed": ["0.62.0"], "affected": "< 0.62.0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["go", "golang-services", "golang.org/x/net", "package"]
not_affected_if: ["html-package-unused", "no-reparse-of-rendered-output"]
published_at: "2026-10-27T21:16:18+00:00"
first_seen_at: "2026-10-27T22:19:32+00:00"
updated_at: "2026-10-27T22:19:54+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6866", "first_seen_at": "2026-10-27T22:19:32+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-97045", "first_seen_at": "2026-10-27T22:29:29+00:00"}]
---

# Check all ancestor namespace transitions when rendering raw text in html in golang.org/x/net

The golang.org/x/net HTML renderer could emit raw text whose ancestor namespace transitions were not fully checked, so re-parsing the output puts the subtree in a different foreign namespace. The sources do not state the concrete impact an attacker gets from this namespace confusion.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:golang.org/x/net affected < 0.62.0 fixed 0.62.0

## How to check

- Run `go list -m golang.org/x/net` in the project and check whether the version is below `0.62.0`
- Run `go list -m -json golang.org/x/net` to confirm the resolved version in the module graph
- Check whether the application renders untrusted HTML through golang.org/x/net/html and re-parses the output

## Fix

- Upgrade golang.org/x/net to `0.62.0` or later with `go get golang.org/x/net@v0.62.0` and then `go mod tidy`

## Timeline

- 2026-10-27T22:19:32+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6866
- 2026-10-27T22:29:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-97045

## From the sources

In childTextNodesAreLiteral, walking up the tree previously stopped at the nearest foreign ancestor once an HTML integration point was found. However, that integration point may itself be a descendant of an element that was foster-parented into a foreign namespace (such as <mglyph> or <malignmark> fostered under <mtext>), causing a parser to resolve the subtree in a different foreign namespace upon re-parsing the rendered output.

Continue walking the full ancestor chain and verify that every transition from a non-empty namespace occurs at an HTML integration point before emitting literal text.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
