{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-23647","id":"CVE-2022-23647","title":"Cross-site Scripting in Prism","description":"Prism is a syntax highlighting library. Starting with version 1.14.0 and prior to version 1.27.0, Prism's command line plugin can be used by attackers to achieve a cross-site scripting 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 Comman","descriptionLong":"Prism is a syntax highlighting library. Starting with version 1.14.0 and prior to version 1.27.0, Prism's command line plugin can be used by attackers to achieve a cross-site scripting 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. This bug has been fixed in v1.27.0. As a workaround, do not use the command line plugin on untrusted inputs, or sanitize all code blocks (remove all HTML code text) from all code blocks that use the command line plugin.","published":"2022-02-18T14:50:10.000Z","updated":"2026-10-28T02:30:43.403704306Z","reserved":"2022-01-19T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L","rating":"high","source":"github.com"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L","rating":"high","source":"GitHub"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"high","products":["PrismJS prism"],"affectedProducts":[{"vendor":"PrismJS","product":"prism","defaultStatus":null,"versions":[{"status":"affected","version":">= 1.14.0, < 1.27.0"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"prismjs","purl":"pkg:npm/prismjs","ranges":[">=1.14.0 <1.27.0"],"fixed":["1.27.0"],"advisory":"GHSA-3949-f494-cm99"}],"cwes":["CWE-79"],"aliases":["GHSA-3949-f494-cm99"],"references":[{"url":"https://github.com/PrismJS/prism/security/advisories/GHSA-3949-f494-cm99","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/PrismJS/prism/pull/3341","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23647.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23647","tags":["advisory"]},{"url":"https://github.com/PrismJS/prism","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.01425,"epssPercentile":0.73488,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-23647","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23647","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-23647","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-3949-f494-cm99","ok":true,"note":"GHSA-3949-f494-cm99"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-23647","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}