Skip to content

html/template: XSS via missing ES2015+ keywords in regexpPrecederKeywords #81823

Closed

Description

@thatnealpatel

html/template: recognize yield as regexp preceder keyword

A trusted template author may have previously
written a valid template wherein the use of
the yield keyword would not be correctly
escaped.

We now ensure that valid keyword uses are
escaped and non-keyword uses are not escaped.

This is CVE-2026-97030 and Go issue https://go.dev/issue/81823.


This was a PUBLIC track issue originally tracked in http://b/545173274.

Activity

  1. changed the title [-]html/template: XSS via missing ES2015+ keywords in regexpPrecederKeywords (await, yield, default)[/-] [+]html/template: XSS via missing ES2015+ keywords in regexpPrecederKeywords[/+] on Sep 28, 2026
  2. gopherbot commented on Sep 28, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/840925 mentions this issue: html/template: recognize yield as regexp preceder keyword

  3. added this to the Go1.28 milestone on Sep 29, 2026
  4. thatnealpatel commented on Sep 30, 2026

    @thatnealpatel
    MemberAuthor

    @gopherbot Please open backports for this security issue.

  5. gopherbot commented on Sep 30, 2026

    @gopherbot
    Contributor

    Backport issue(s) opened: #81909 (for 1.26), #81910 (for 1.27).

    Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

  6. gopherbot commented on Oct 2, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/843645 mentions this issue: html/template: recognize yield as regexp preceder keyword

  7. gopherbot commented on Oct 2, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/843625 mentions this issue: html/template: recognize yield as regexp preceder keyword

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions