{
  "id": "security/go/a-h__templ/2026-10-06-script-template-literal-interpolation-xss",
  "title": "templ: {{ }} interpolation in a script template literal not escaped for ${",
  "category": "security",
  "type": "xss",
  "severity": "low",
  "ecosystem": "go",
  "project": {
    "owner": "a-h",
    "repo": "templ",
    "url": "https://github.com/a-h/templ"
  },
  "affected_versions": [
    "github.com/a-h/templ >= 0.3.850, <= 0.3.1070"
  ],
  "status": "published",
  "summary": "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.",
  "discovered_at": "2026-10-06T00:00:00+03:00",
  "updated_at": "2026-10-26T12:06:00+03:00",
  "public": true,
  "credit": "ucsurf",
  "disclosure": {
    "url": "https://github.com/a-h/templ/security/advisories/GHSA-jq3r-rjqp-mwgj",
    "reported_at": "2026-10-07T16:19:00+03:00",
    "ghsa_id": "GHSA-jq3r-rjqp-mwgj",
    "channel": "pvr",
    "cve_id": null,
    "published_at": "2026-10-26T12:01:31+03:00"
  },
  "patched_versions": [
    "github.com/a-h/templ v0.3.1100"
  ],
  "cvss": null,
  "rules": [
    {
      "name": "templ-safeurl-dynamic",
      "url": "https://github.com/ucsurf/vuln-patterns/blob/main/rules/go/xss/templ-safeurl-dynamic.yaml"
    }
  ]
}
