Approved changes feed: RSS · Atom

cpe:2.3:a:go_standard_library:html/template:*:*:*:*:*:*:*:*

part: a version: * update: *

VendorGo Standard Library (50bc78d3-15d0-59a4-bc22-a964570e0614)
ProductHtml/Template (2e6ae857-762a-5fbd-89cb-c0aba77ec0af)
Edition*
Language*
Software edition*
Target software*
Target hardware*
Other*
NotesImported from gcve-enriched-dumps CVE data

PURL mappings

PURLSourceLast updated
No PURL mappings for this CPE yet.

Vulnerability references

IdentifiercpeApplicabilitySubmitteddb.gcve.eu detailsRationale
CVE:CVE-2026-39826 vulnerable 2026-06-03 15:22:13.151682 Escaper bypass leads to XSS in html/template
If a trusted template author were to write a <script> tag containing an empty 'type' attribute or a 'type' attribute with an ASCII whitespace, the execution of the template would incorrectly escape any data passed into the <script> block.
Published: 2026-05-07T19:41:19.138Z
Updated: 2026-05-08T14:05:05.849Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2026-39823 vulnerable 2026-06-03 15:22:13.142754 Bypass of meta content URL escaping causes XSS in html/template
CVE-2026-27142 fixed a vulnerability in which URLs were not correctly escaped inside of a <meta> tag's <content> attribute. If the URL content were to insert ASCII whitespaces around the '=' rune inside of the <content> attribute, the escaper would fail to similarly escape it, leading to XSS.
Published: 2026-05-07T19:41:19.524Z
Updated: 2026-05-08T14:05:55.152Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2026-32289 vulnerable 2026-06-03 15:20:42.705177 JsBraceDepth Context Tracking Bugs (XSS) in html/template
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 literals to be incorrectly or improperly escaped, leading to XSS vulnerabilities.
Published: 2026-04-08T01:06:56.297Z
Updated: 2026-04-13T18:20:46.377Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2026-27142 vulnerable 2026-06-03 15:18:06.080943 URLs in meta content attribute actions are not escaped in html/template
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 setting htmlmetacontenturlescape=0.
Published: 2026-03-06T21:28:14.674Z
Updated: 2026-03-16T15:21:14.465Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2024-24785 vulnerable 2026-06-03 14:55:05.764592 Errors returned from JSON marshaling may break template escaping in html/template
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.
Published: 2024-03-05T22:22:33.640Z
Updated: 2025-03-14T00:55:26.398Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2023-39319 vulnerable 2026-06-03 14:52:38.672192 Improper handling of special tags within script contexts in html/template
The html/template package does not apply the proper rules for handling occurrences of "<script", "<!--", and "</script" within JS literals in <script> 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.
Published: 2023-09-08T16:13:28.663Z
Updated: 2025-02-13T17:02:47.366Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2023-39318 vulnerable 2026-06-03 14:52:38.671083 Improper handling of HTML-like comments in script contexts in html/template
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.
Published: 2023-09-08T16:13:24.063Z
Updated: 2025-02-13T17:02:46.777Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2023-29400 vulnerable 2026-06-03 14:51:40.871539 Improper handling of empty HTML attributes in html/template
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.
Published: 2023-05-11T15:29:24.874Z
Updated: 2025-01-24T16:47:46.724Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2023-24540 vulnerable 2026-06-03 14:49:30.094768 Improper handling of JavaScript whitespace in html/template
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.
Published: 2023-05-11T15:29:31.947Z
Updated: 2025-01-24T16:45:07.999Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2023-24539 vulnerable 2026-06-03 14:49:30.094440 Improper sanitization of CSS values in html/template
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.
Published: 2023-05-11T15:29:38.143Z
Updated: 2025-01-24T16:41:28.222Z
Reference links
Imported from gcve-enriched-dumps CVE data
CVE:CVE-2023-24538 vulnerable 2026-06-03 14:49:30.093962 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 code into the Go template. As ES6 template literals are rather complex, and themselves can do string interpolation, the decision was made to simply disallow Go template actions from being used inside of them (e.g. "var a = {{.}}"), since there is no obviously safe way to allow this behavior. This takes the same approach as github.com/google/safehtml. With fix, Template.Parse returns an Error when it encounters templates like this, with an ErrorCode of value 12. This ErrorCode is currently unexported, but will be exported in the release of Go 1.21. Users who rely on the previous behavior can re-enable it using the GODEBUG flag jstmpllitinterp=1, with the caveat that backticks will now be escaped. This should be used with caution.
Published: 2023-04-06T15:50:48.185Z
Updated: 2025-02-13T16:44:19.259Z
Reference links
Imported from gcve-enriched-dumps CVE data

Contribute

You can submit an edit proposal for this CPE entry or suggest a related product/vendor addition using the action button above.