GoSeverity: MediumStatus: Published
JavaScript template literals not escaped by contextual autoescaping
Contextual autoescaping did not escape backticks, $ and { in values shown in JavaScript template literals. The same applies to values shown in JavaScript code after a template literal that contains a quote, so an attacker-controlled value could execute JavaScript on the page. Versions up to and including v0.61.1 are affected. Fixed in v0.62.0. The published advisory is GHSA-36mv-rmc7-qf5q. GitHub rates it medium, with CVSS 3.1 score 6.1. There is no CVE. The advisory credits Ugur Celik (ucsurf).
The issue
Contextual autoescaping did not escape backticks, $ and { in values shown in JavaScript template literals. The same applies to values shown in JavaScript code after a template literal that contains a quote. An attacker-controlled value could execute JavaScript on the page (CWE-79, CWE-116).
Affected versions and fix
Versions up to and including v0.61.1 are affected. The fix is in v0.62.0.
The published advisory is GHSA-36mv-rmc7-qf5q. GitHub rates it medium, with CVSS 3.1 score 6.1. There is no CVE. gazerro published the advisory. The advisory credits Ugur Celik (ucsurf). The fix release is v0.62.0.
Timeline
- Found
- Advisory published
- Entry last updated
Machine-readable: JSON · Markdown · ID security/go/open2b__scriggo/2026-10-28-js-template-literal-autoescape-xss
If this work is useful to you, you can support it on Buy Me a Coffee.