// For flags

CVE-2023-39318

Improper handling of HTML-like comments in script contexts in html/template

Severity Score

6.1
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

El paquete html/template no maneja correctamente los tokens de comentario "" similares a HTML, ni los tokens de comentario hashbang "#!", en el contexto

A flaw was found in Golang. The html/template package did not properly handle HMTL-like "<!--" and "-->" comment tokens, nor hashbang "#!" comment tokens, in <script> contexts. This issue may cause the template parser to improperly interpret the contents of <script> contexts, causing actions to be improperly escaped.

*Credits: Takeshi Kaneko (GMO Cybersecurity by Ierae, Inc.)
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2023-07-27 CVE Reserved
  • 2023-09-08 CVE Published
  • 2024-08-02 CVE Updated
  • 2024-09-14 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Golang
Search vendor "Golang"
Go
Search vendor "Golang" for product "Go"
< 1.20.8
Search vendor "Golang" for product "Go" and version " < 1.20.8"
-
Affected
Golang
Search vendor "Golang"
Go
Search vendor "Golang" for product "Go"
>= 1.21.0 < 1.21.1
Search vendor "Golang" for product "Go" and version " >= 1.21.0 < 1.21.1"
-
Affected