{
  "id": "security/go/a-h__templ/2026-10-06-url-attribute-sanitization-gap",
  "title": "templ: javascript: URLs not sanitised in other URL attributes and mixed-case attribute names",
  "category": "security",
  "type": "xss",
  "severity": "medium",
  "ecosystem": "go",
  "project": {
    "owner": "a-h",
    "repo": "templ",
    "url": "https://github.com/a-h/templ"
  },
  "affected_versions": [
    "github.com/a-h/templ <= 0.3.1070"
  ],
  "status": "published",
  "summary": "templ sanitised string URLs only in a few attributes (a/link href, form action, object data) and only when the attribute name was lowercase. String values in other URL-bearing attributes, or in uppercase or mixed-case attribute names, were written without URL sanitisation, so javascript: URLs could pass through and run script. 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-94c2-xg24-pwhv",
    "reported_at": "2026-10-07T16:39:00+03:00",
    "ghsa_id": "GHSA-94c2-xg24-pwhv",
    "channel": "pvr",
    "cve_id": null,
    "published_at": "2026-10-26T12:02:53+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"
    }
  ]
}
