# CVE-2026-97030: Go html/template XSS via missing ES2015+ keywords

Source: https://junglewise.ai/threats/cve-2026-97030-go-2026-6600-recognize-yield-as-regexp-preceder-keyword-in-html  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-08. Updated: 2026-10-10  
License: CC BY 4.0 with a link back

CVE-2026-97030 · Severity: medium · CVSS 6.1 · Published 2026-10-08

Go's html/template package, used to safely render templates in web applications, failed to recognize the "yield" keyword as a context where regular expressions require escaping. An attacker who can control template content could inject code that bypasses the template security model, potentially leading to cross-site scripting (XSS) attacks that expose user data or hijack sessions.

Technologies: [go (Go)](https://junglewise.ai/threats/technologies/go), [stdlib (Go)](https://junglewise.ai/threats/technologies/go-stdlib). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-97030 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-97030 being exploited in the wild.

**How severe is CVE-2026-97030?** Medium severity, with a CVSS score of 6.1, published 8 October 2026.

**Which products and versions are affected?** go (Go) prior to fix; stdlib (Go) SEMVER:introduced=0,fixed=1.26.9,introduced=1.27.0-0,fixed=1.27.2.

**Is there a fix for CVE-2026-97030?** Yes. stdlib (Go): upgrade to 1.27.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-97030 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-97030?** Check whether you run go (Go) or stdlib (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- stdlib (Go): upgrade to 1.27.2 or later

  ```sh
  go get stdlib@v1.27.2
  ```


## Technical details

The vulnerability is a missing keyword in the regexpPrecederKeywords list in html/template, which determines when regular expression literals require proper escaping. The "yield" keyword, introduced in ES2015+, was not recognized, allowing an attacker to craft templates where a regex following "yield" would be incorrectly treated as a division operator rather than a regex literal. This is a template injection/XSS vulnerability requiring the attacker to control template source code.

## Affected products

- Go Go prior to fix

## Identifiers

- CVE-2026-97030
- GO-2026-6600

## Timeline

- 2026-09-28: disclosed: Issue filed as public track
- 2026-10-08: advisory

## References

- [https://go.dev/cl/840925](https://go.dev/cl/840925)
- [https://go.dev/issue/81823](https://go.dev/issue/81823)

## Related threats

- [Go HTTP/1 server race condition in MaxBytesReader header handling](https://junglewise.ai/threats/cve-2026-97054-for-http-1-servers-when-maxbytesreader-s-limit-is-exceeded)
- [Go command unsafe pkg-config flag handling in cgo](https://junglewise.ai/threats/cve-2026-97039-building-a-malicious-package-that-uses-cgo-pkg-config-directives)
- [Go linker code injection via malicious package compilation](https://junglewise.ai/threats/cve-2026-97038-building-a-malicious-package-containing-syso-files-or-cgo-linker)
- [Go arbitrary code execution via malicious cgo linker flags](https://junglewise.ai/threats/cve-2026-97037-building-a-malicious-package-that-uses-cgo-could-cause-arbitrary)
- [Go cgo arbitrary code execution via Apple linker argument injection](https://junglewise.ai/threats/cve-2026-97036-on-darwin-building-a-malicious-package-that-uses-cgo-could-cause)
