CVE-2023-29400

Improper handling of empty HTML attributes in html/template

State
Published
Severity
7.3 High
Published
May 11, 2023
Updated
Jan 24, 2025
Reserved
Apr 5, 2023

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.17.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:LCISA-ADP

Weaknesses

  • CWE-94 Improper Control of Generation of Code ('Code Injection')

Affected Products

ProductVersions
html/templateGo standard library
  • before 1.19.9Affected
  • 1.20.0-0 to before 1.20.4Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.