[NPM:GHSA-VVHJ-V88F-5GXR] ghtml Cross-Site Scripting (XSS) vulnerability

Severity High
Affected Packages 1
Fixed Packages 1
CVEs 1

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.
Package Affected Version
pkg:npm/ghtml < 2.0.0
Package Fixed Version
pkg:npm/ghtml = 2.0.0
ID
NPM:GHSA-VVHJ-V88F-5GXR
Severity
high
URL
https://github.com/advisories/GHSA-vvhj-v88f-5gxr
Published
2024-06-10T21:36:48
(13 days ago)
Modified
2024-06-10T21:36:49
(13 days ago)
Rights
NPM Security Team
Type Package URL Namespace Name / Product Version Distribution / Platform Arch Patch / Fix
Affected pkg:npm/ghtml ghtml < 2.0.0
Fixed pkg:npm/ghtml ghtml = 2.0.0
# CVE Description CVSS EPSS EPSS Trend (30 days) Affected Products Weaknesses Security Advisories Exploits PoC Pubblication Date Modification Date
# CVE Description CVSS EPSS EPSS Trend (30 days) Affected Products Weaknesses Security Advisories PoC Pubblication Date Modification Date
Loading...