GHSA-3949-f494-cm99

Suggest an improvement
Source
https://github.com/advisories/GHSA-3949-f494-cm99
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/02/GHSA-3949-f494-cm99/GHSA-3949-f494-cm99.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-3949-f494-cm99
Aliases
Published
2022-02-22T19:32:18Z
Modified
2023-11-01T04:57:59.311029Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L CVSS Calculator
Summary
Cross-site Scripting in Prism
Details

Impact

Prism's Command line plugin can be used by attackers to achieve an XSS attack. The Command line plugin did not properly escape its output, leading to the input text being inserted into the DOM as HTML code.

Server-side usage of Prism is not impacted. Websites that do not use the Command Line plugin are also not impacted.

Patches

This bug has been fixed in v1.27.0.

Workarounds

Do not use the Command line plugin on untrusted inputs, or sanitized all code blocks (remove all HTML code text) from all code blocks that use the Command line plugin.

References

  • https://github.com/PrismJS/prism/pull/3341
Database specific
{
    "nvd_published_at": "2022-02-18T15:15:00Z",
    "github_reviewed_at": "2022-02-22T19:32:18Z",
    "severity": "HIGH",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-79"
    ]
}
References

Affected packages

npm / prismjs

Package

Affected ranges

Type
SEMVER
Events
Introduced
1.14.0
Fixed
1.27.0