{"id":"CVE-2024-37166","published":"2024-06-10T21:29:28Z","modified":"2024-08-02T03:50:54Z","title":"ghtml Cross-Site Scripting (XSS) vulnerability","vendor":"gurgunday","product":"ghtml","tier":"tail","description":{"text":"ghtml is software that uses tagged templates for template engine functionality. It is possible to introduce user-controlled JavaScript code and trigger a Cross-Site Scripting (XSS) vulnerability in some cases. Version 2.0.0 introduces changes to mitigate this issue. Version 2.0.0 contains updated 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. Additionally, 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.9,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00436,"percentile":0.38747,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-80","name":"Improper Neutralization of Script-Related HTML Tags in a Web Page"}],"references":[{"url":"https://github.com/gurgunday/ghtml/security/advisories/GHSA-vvhj-v88f-5gxr","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/gurgunday/ghtml/commit/df1ea50fe8968a766fd2b9379a8f9806375227f8","tags":["x_refsource_MISC"]}],"priority":{"score":14.0,"factors":[{"name":"EPSS percentile","points":7.75},{"name":"CVSS severity","points":6.23}]},"vendorSlug":"gurgunday","affectedVersions":[{"vendor":"gurgunday","product":"ghtml","versions":["< 2.0.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2024-06-11T13:48:07.690512Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"ghtml","vulnerableRanges":["<2.0.0"],"patched":["2.0.0"],"from":["GHSA-vvhj-v88f-5gxr"],"provenance":"source"}],"summary":{"text":"The ghtml template engine (by gurgunday) contains a cross-site scripting flaw in which user-controlled JavaScript can end up in rendered output in some cases. An attacker who can supply input to a template, with low privileges and with a user interacting with the crafted content, can run script in the context of the victim's session, which can expose confidential data and alter the integrity of the page, with limited impact on availability.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:35:09Z"},"euvd":{"id":"EUVD-2024-2182","exploited":false,"provenance":"source"}}