Security mailing lists by PureSourceCode

CVE-2023-39318

MEDIUM 6.1CVSS 3.1

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
8 Sep 2023
Last modified
17 Jun 2026
Assigned by
security@golang.org
NVD status
Modified
Weakness
CWE-79
Also known as
BIT-golang-2023-39318GO-2023-2041
Sources
NVDJSONOSV GO-2023-2041JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD golang go
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
< 1.20.8 1.20.8
NVD golang go
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
>= 1.21.0, < 1.21.1 1.21.1
OSV Go stdlib < 1.20.8; >= 1.21.0-0, < 1.21.1 1.20.8, 1.21.1

References

History

  • 25 Nov 2026 20:36 UTC · NVD: first stored (published 8 Sep 2023)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 7 Sep 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.