// For flags

CVE-2024-24785

Errors returned from JSON marshaling may break template escaping in html/template

Severity Score

6.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

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.

Si los errores devueltos por los métodos MarshalJSON contienen datos controlados por el usuario, se pueden usar para romper el comportamiento de escape automático contextual del paquete html/template, permitiendo acciones posteriores para inyectar contenido inesperado en las plantillas.

A flaw was found in Go's html/template standard library package. 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 subsequent actions to inject unexpected content into templates.

*Credits: RyotaK (https://ryotak.net)
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-01-30 CVE Reserved
  • 2024-03-05 CVE Published
  • 2024-05-02 EPSS Updated
  • 2024-08-01 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Go Standard Library
Search vendor "Go Standard Library"
Html/template
Search vendor "Go Standard Library" for product "Html/template"
< 1.21.8
Search vendor "Go Standard Library" for product "Html/template" and version " < 1.21.8"
en
Affected
Go Standard Library
Search vendor "Go Standard Library"
Html/template
Search vendor "Go Standard Library" for product "Html/template"
>= 1.22.0-0 < 1.22.1
Search vendor "Go Standard Library" for product "Html/template" and version " >= 1.22.0-0 < 1.22.1"
en
Affected