GoSeverity: LowStatus: Published

templ: {{ }} interpolation in a script template literal not escaped for ${

Inside a <script> element, {{ }} interpolation placed within a JavaScript template literal was not escaped for the ${ sequence. Attacker-controlled input could open a template expression and run arbitrary JavaScript in the page. Fixed in v0.3.1100.

Timeline

  1. Found
  2. Reported via private vulnerability report
  3. Advisory published
  4. Entry last updated

Machine-readable: JSON · Markdown · ID security/go/a-h__templ/2026-10-06-script-template-literal-interpolation-xss

If this work is useful to you, you can support it on Buy Me a Coffee.