GO-2023-1753

Source
https://pkg.go.dev/vuln/GO-2023-1753
Import Source
https://vuln.go.dev/ID/GO-2023-1753.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2023-1753
Aliases
Published
2023-05-05T21:10:24Z
Modified
2024-05-20T16:03:47Z
Summary
Improper handling of empty HTML attributes in html/template
Details

Templates containing actions in unquoted HTML attributes (e.g. "attr={{.}}") executed with empty input can result in output with unexpected results when parsed due to HTML normalization rules. This may allow injection of arbitrary attributes into tags.

References
Credits
    • Juho Nurminen of Mattermost

Affected packages

Go / stdlib

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.19.9
Introduced
1.20.0-0
Fixed
1.20.4

Ecosystem specific

{
    "imports": [
        {
            "path": "html/template",
            "symbols": [
                "Template.Execute",
                "Template.ExecuteTemplate",
                "appendCmd",
                "htmlNospaceEscaper"
            ]
        }
    ]
}