{"api_version":"1","generated_at":"2026-04-23T18:36:41+00:00","cve":"CVE-2022-23647","urls":{"html":"https://cve.report/CVE-2022-23647","api":"https://cve.report/api/cve/CVE-2022-23647.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-23647","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-23647"},"summary":{"title":"CVE-2022-23647","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 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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-02-18 15:15:00","updated_at":"2022-02-28 19:19:00"},"problem_types":["CWE-79"],"metrics":[],"references":[{"url":"https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c","name":"https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c","refsource":"MISC","tags":[],"title":"Command Line: Escape markup in command line output (#3341) · PrismJS/prism@e002e78 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/PrismJS/prism/pull/3341","name":"https://github.com/PrismJS/prism/pull/3341","refsource":"MISC","tags":[],"title":"Command Line: Escape markup in command line output by at055612 · Pull Request #3341 · PrismJS/prism · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/PrismJS/prism/security/advisories/GHSA-3949-f494-cm99","name":"https://github.com/PrismJS/prism/security/advisories/GHSA-3949-f494-cm99","refsource":"CONFIRM","tags":[],"title":"XSS vulnerability in the Command line plugin in prismjs · Advisory · PrismJS/prism · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-23647","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23647","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"23647","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"prismjs","cpe5":"prism","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"node.js","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-23647","qid":"179222","title":"Debian Security Update for node-prismjs (CVE-2022-23647)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2022-23647","STATE":"PUBLIC","TITLE":"Cross-site Scripting in Prism"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"prism","version":{"version_data":[{"version_value":">= 1.14.0, < 1.27.0"}]}}]},"vendor_name":"PrismJS"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"}]}]},"references":{"reference_data":[{"name":"https://github.com/PrismJS/prism/security/advisories/GHSA-3949-f494-cm99","refsource":"CONFIRM","url":"https://github.com/PrismJS/prism/security/advisories/GHSA-3949-f494-cm99"},{"name":"https://github.com/PrismJS/prism/pull/3341","refsource":"MISC","url":"https://github.com/PrismJS/prism/pull/3341"},{"name":"https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c","refsource":"MISC","url":"https://github.com/PrismJS/prism/commit/e002e78c343154e1c0ddf9d6a0bb85689e1a5c7c"}]},"source":{"advisory":"GHSA-3949-f494-cm99","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-02-18 15:15:00","lastModifiedDate":"2022-02-28 19:19:00","problem_types":["CWE-79"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"CHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE","baseScore":6.1,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.8,"impactScore":2.7},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:M/Au:N/C:N/I:P/A:N","accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"NONE","integrityImpact":"PARTIAL","availabilityImpact":"NONE","baseScore":4.3},"severity":"MEDIUM","exploitabilityScore":8.6,"impactScore":2.9,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":true}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:prismjs:prism:*:*:*:*:*:node.js:*:*","versionStartIncluding":"1.14.0","versionEndExcluding":"1.27.0","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2022","CveId":"23647","Ordinal":"226484","Title":"CVE-2022-23647","CVE":"CVE-2022-23647","Year":"2022"},"notes":[{"CveYear":"2022","CveId":"23647","Ordinal":"1","NoteData":"** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.","Type":"Description","Title":null}]}}}