CVE-2024-37166 – ghtml
Package
Manager: npm
Name: ghtml
Vulnerable Version: >=0 <2.0.0
Severity
Level: High
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
EPSS: 0.00157 pctl0.37028
Details
ghtml Cross-Site Scripting (XSS) vulnerability ## Summary It is possible to introduce user-controlled JavaScript code and trigger a Cross-Site Scripting (XSS) vulnerability in some cases. ## Actions Taken - Updated the documentation to clarify that while `ghtml` escapes characters with special meaning in HTML, it does not provide comprehensive protection against all types of XSS attacks in every scenario. **_This aligns with the approach taken by other template engines. Developers should be cautious and take additional measures to sanitize user input and prevent potential vulnerabilities._** More reading: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html - The backtick character (`) is now also escaped to prevent the creation of strings in most cases where a malicious actor somehow gains the ability to write JavaScript. This does not provide comprehensive protection either.
Metadata
Created: 2024-06-10T21:36:48Z
Modified: 2024-06-11T18:27:52Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-vvhj-v88f-5gxr/GHSA-vvhj-v88f-5gxr.json
CWE IDs: ["CWE-79", "CWE-80"]
Alternative ID: GHSA-vvhj-v88f-5gxr
Finding: F008
Auto approve: 1