{"id":"GHSA-vvhj-v88f-5gxr","revision":"319fb70cd314462493958f3f101e932b","records":[{"revision":"319fb70cd314462493958f3f101e932b","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-vvhj-v88f-5gxr","aliases":["CVE-2024-37166"],"title":"ghtml Cross-Site Scripting (XSS) vulnerability","description":"## Summary\n\nIt is possible to introduce user-controlled JavaScript code and trigger a Cross-Site Scripting (XSS) vulnerability in some cases.\n\n## Actions Taken\n\n- 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\n- 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.","state":0,"publishedAt":"2024-06-10T21:36:48+00:00","modifiedAt":"2026-09-10T03:50:15.9930616+00:00","affected":[{"ecosystem":"npm","name":"ghtml","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.0.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/gurgunday/ghtml/security/advisories/GHSA-vvhj-v88f-5gxr","https://nvd.nist.gov/vuln/detail/CVE-2024-37166","https://github.com/gurgunday/ghtml/commit/df1ea50fe8968a766fd2b9379a8f9806375227f8","https://github.com/gurgunday/ghtml"],"sourceUrl":"https://github.com/advisories/GHSA-vvhj-v88f-5gxr","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-vvhj-v88f-5gxr","identifiers":["GHSA-vvhj-v88f-5gxr","CVE-2024-37166"]},"retained":false,"historicalAffected":[]}],"coverage":[]}