The html/template package does not properly handle HTML-like โโ comment tokens, nor hashbang โ#!โ comment tokens, in <script> contexts. This may cause the template parser to improperly interpret the contents of <script> contexts, causing actions to be improperly escaped. This may be leveraged to perform an XSS attack.
[
{
"vendor": "Go standard library",
"product": "html/template",
"collectionURL": "https://pkg.go.dev",
"packageName": "html/template",
"versions": [
{
"version": "0",
"lessThan": "1.20.8",
"status": "affected",
"versionType": "semver"
},
{
"version": "1.21.0-0",
"lessThan": "1.21.1",
"status": "affected",
"versionType": "semver"
}
],
"programRoutines": [
{
"name": "isComment"
},
{
"name": "escaper.escapeText"
},
{
"name": "tJS"
},
{
"name": "tLineCmt"
},
{
"name": "Template.Execute"
},
{
"name": "Template.ExecuteTemplate"
}
],
"defaultStatus": "unaffected"
}
]