Go Standard Library Html Template vulnerabilities
9 known vulnerabilities affecting go_standard_library/html_template.
Total CVEs
9
CISA KEV
0
Public exploits
0
Exploited in wild
0
Severity breakdown
CRITICAL2HIGH2MEDIUM5
Vulnerabilities
Page 1 of 1
CVE-2026-32289MEDIUMCVSS 6.1fixed in 1.25.9≥ 1.26.0-0, < 1.26.22026-04-08
CVE-2026-32289 [MEDIUM] CVE-2026-32289: Context was not properly tracked across template branches for JS template literals, leading to possi
Context was not properly tracked across template branches for JS template literals, leading to possibly incorrect escaping of content when branches were used. Additionally template actions within JS template literals did not properly track the brace depth, leading to incorrect escaping being applied. These issues could cause actions within JS template liter
cvelistv5nvd
CVE-2026-27142MEDIUMCVSS 6.1fixed in 1.25.8≥ 1.26.0-0, < 1.26.12026-03-06
CVE-2026-27142 [MEDIUM] CVE-2026-27142: Actions which insert URLs into the content attribute of HTML meta tags are not escaped. This can all
Actions which insert URLs into the content attribute of HTML meta tags are not escaped. This can allow XSS if the meta tag also has an http-equiv attribute with the value "refresh". A new GODEBUG setting has been added, htmlmetacontenturlescape, which can be used to disable escaping URLs in actions in the meta content attribute which follow "url=" by settin
cvelistv5nvd
CVE-2024-24785MEDIUMCVSS 5.4fixed in 1.21.8≥ 1.22.0-0, < 1.22.12024-03-05
CVE-2024-24785 [MEDIUM] CVE-2024-24785: If errors returned from MarshalJSON methods contain user controlled data, they may be used to break
If errors returned from MarshalJSON methods contain user controlled data, they may be used to break the contextual auto-escaping behavior of the html/template package, allowing for subsequent actions to inject unexpected content into templates.
cvelistv5nvd
CVE-2023-39318MEDIUMCVSS 6.1fixed in 1.20.8≥ 1.21.0-0, < 1.21.12023-09-08
CVE-2023-39318 [MEDIUM] CWE-79 CVE-2023-39318: The html/template package does not properly handle HTML-like "" comment tokens, nor hashbang "#!" co
The html/template package does not properly handle HTML-like "" comment tokens, nor hashbang "#!" comment tokens, in contexts. This may cause the template parser to improperly interpret the contents of contexts, causing actions to be improperly escaped. This may be leveraged to perform an XSS attack.
cvelistv5nvd
CVE-2023-39319MEDIUMCVSS 6.1fixed in 1.20.8≥ 1.21.0-0, < 1.21.12023-09-08
CVE-2023-39319 [MEDIUM] CWE-79 CVE-2023-39319: The html/template package does not apply the proper rules for handling occurrences of "<script", "<!
The html/template package does not apply the proper rules for handling occurrences of " contexts. This may cause the template parser to improperly consider script contexts to be terminated early, causing actions to be improperly escaped. This could be leveraged to perform an XSS attack.
cvelistv5nvd
CVE-2023-24540CRITICALCVSS 9.8fixed in 1.19.9≥ 1.20.0-0, < 1.20.42023-05-11
CVE-2023-24540 [CRITICAL] CWE-77 CVE-2023-24540: Not all valid JavaScript whitespace characters are considered to be whitespace. Templates containing
Not all valid JavaScript whitespace characters are considered to be whitespace. Templates containing whitespace characters outside of the character set "\t\n\f\r\u0020\u2028\u2029" in JavaScript contexts that also contain actions may not be properly sanitized during execution.
cvelistv5nvd
CVE-2023-24539HIGHCVSS 7.3fixed in 1.19.9≥ 1.20.0-0, < 1.20.42023-05-11
CVE-2023-24539 [HIGH] CWE-74 CVE-2023-24539: Angle brackets (<>) are not considered dangerous characters when inserted into CSS contexts. Templat
Angle brackets (<>) are not considered dangerous characters when inserted into CSS contexts. Templates containing multiple actions separated by a '/' character can result in unexpectedly closing the CSS context and allowing for injection of unexpected HTML, if executed with untrusted input.
cvelistv5nvd
CVE-2023-29400HIGHCVSS 7.3fixed in 1.19.9≥ 1.20.0-0, < 1.20.42023-05-11
CVE-2023-29400 [HIGH] CWE-74 CVE-2023-29400: Templates containing actions in unquoted HTML attributes (e.g. "attr={{.}}") executed with empty inp
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.
cvelistv5nvd
CVE-2023-24538CRITICALCVSS 9.8fixed in 1.19.8≥ 1.20.0-0, < 1.20.32023-04-06
CVE-2023-24538 [CRITICAL] Backticks not treated as string delimiters in html/template
Backticks not treated as string delimiters in html/template
Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action within a Javascript template literal, the contents of the action can be used to terminate the literal, injecting arbitrary Javascript
cvelistv5