ADVISORIES

Go Vulnerability Database

GO-2023-1753

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.

Affected packages

EcosystemPackageAffected versions
Gostdlib
All versions before 1.19.9 (fixed in 1.19.9)
From 1.20.0-0 before 1.20.4 (fixed in 1.20.4)

References