GHSA-vvhj-v88f-5gxr

Suggest an improvement
Source
https://github.com/advisories/GHSA-vvhj-v88f-5gxr
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-vvhj-v88f-5gxr/GHSA-vvhj-v88f-5gxr.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-vvhj-v88f-5gxr
Aliases
Published
2024-06-10T21:36:48Z
Modified
2024-06-11T18:27:52Z
Severity
  • 8.9 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L CVSS Calculator
Summary
ghtml Cross-Site Scripting (XSS) vulnerability
Details

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/CrossSiteScriptingPreventionCheat_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.
Database specific
{
    "nvd_published_at": "2024-06-10T22:15:12Z",
    "cwe_ids": [
        "CWE-79",
        "CWE-80"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2024-06-10T21:36:48Z"
}
References

Affected packages

npm / ghtml

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.0.0