CVE-2024-24785: Errors returned from JSON marshaling may break template escaping in html/template
Errors returned from JSON marshaling may break template escaping in html/template
Other sources
Golang Go could allow a remote attacker to bypass security restrictions, caused by a flaw in the MarshalJSON methods in the html/template package. By sending a specially crafted request, an attacker could exploit this vulnerability to inject unexpected content into templates.
— IBM
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.
https://github.com/golang/go/issues/65697
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2024-24785?
CVE-2024-24785 is considered a medium severity vulnerability due to the potential for remote exploitation.
How do I fix CVE-2024-24785?
To fix CVE-2024-24785, update to the appropriate versions of Go or affected software as detailed in the remediation section.
What systems are affected by CVE-2024-24785?
CVE-2024-24785 affects IBM Concert Software versions up to 1.0.2.1 and several versions of Golang packages across different distributions.
What type of vulnerability is CVE-2024-24785?
CVE-2024-24785 is a remote code execution vulnerability due to improper handling of JSON marshaling in the html/template package.
Can CVE-2024-24785 lead to further attacks?
Yes, if exploited, CVE-2024-24785 could allow attackers to inject malicious content into templates, potentially leading to further attacks.