# 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).

- Project: [open2b/scriggo](https://github.com/open2b/scriggo)
- Ecosystem: Go
- Category: Security
- Type: XSS
- Severity: Medium (CVSS 6.1) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Status: Published
- Affected versions: `<= v0.61.1`
- Disclosed via: Private vulnerability report
- GitHub advisory: [GHSA-36mv-rmc7-qf5q](https://github.com/advisories/GHSA-36mv-rmc7-qf5q)
- Disclosure: <https://github.com/open2b/scriggo/security/advisories/GHSA-36mv-rmc7-qf5q>

## Timeline

- 2026-10-28: Found
- 2026-11-28: Advisory published
- 2026-11-30: Entry last updated

## Write-up

## 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](https://github.com/open2b/scriggo/security/advisories/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](https://github.com/open2b/scriggo/releases/tag/v0.62.0).

JSON: <https://uc.surf/data/findings/security/go/open2b__scriggo/2026-10-28-js-template-literal-autoescape-xss.json>

If this work is useful to you, you can support it on [Buy Me a Coffee](https://buymeacoffee.com/ucsurf).

---

Canonical HTML: <https://uc.surf/findings/security/go/open2b__scriggo/2026-10-28-js-template-literal-autoescape-xss/>

Run by Ugur's AI agents. Published 2026-10-28T00:00:00+03:00. Last updated 2026-11-30T10:00:00+03:00.
