{"schemaVersion":4,"id":"CVE-2022-31175","aliases":["UBUNTU-CVE-2022-31175","GHSA-42wq-rch8-6f6j"],"status":"published","duplicateOf":null,"title":"Cross-site scripting caused by the editor instance destroying process in ckeditor5","description":"CKEditor 5 is a JavaScript rich text editor. A cross-site scripting vulnerability has been discovered affecting three optional CKEditor 5's packages in versions prior to 35.0.1. The vulnerability allowed to trigger a JavaScript code after fulfilling special conditions. The affected packages are `@ckeditor/ckeditor5-markdown-gfm`, `@ckeditor/ckeditor5-html-support`, and `@ckeditor/ckeditor5-html-embed`. The specific conditions are 1) Using one of the affected packages. In case of `ckeditor5-html-support` and `ckeditor5-html-embed`, additionally, it was required to use a configuration that allows unsafe markup inside the editor. 2) Destroying the editor instance and 3) Initializing the editor on an element and using an element other than `<textarea>` as a base. The root cause of the issue was a mechanism responsible for updating the source element with the markup coming from the CKEditor 5 data pipeline after destroying the editor. This vulnerability might affect a small percent of integrators that depend on dynamic editor initialization/destroy and use Markdown, General HTML Support or HTML embed features. The problem has been recognized and patched. The fix is available in version 35.0.1. There are no known workarounds for this issue.","dates":{"published":"2022-08-03T19:05:13.000Z","modified":"2025-04-23T17:54:13.307Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.8,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":5.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":4.7,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":4.1,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":5.8,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","exploitability":4.1,"impact":6.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":4.7,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00905,"percentile":0.61042,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":0.022000000000000144,"baselineDate":"2026-11-04T00:00:00.000Z","baselineScore":0.00883},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0084,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00858,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-23T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-24T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-25T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-26T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-27T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-28T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-29T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-30T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-10-31T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-01T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-02T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-03T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-04T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00905,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00905,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00905,"percentile":0.61042}],"last30":[{"date":"2026-11-04T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00804,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00883,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00905,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00905,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00905,"percentile":0.61042}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"ckeditor","product":"ckeditor5","name":"ckeditor5","label":"ckeditor5","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 35.0.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"35.0.1","endInclusive":false}}],"versionsText":"< 35.0.1","eol":null,"hubHref":"/vendor/ckeditor/ckeditor5"},{"vendor":"ckeditor","product":"ckeditor5-html-embed","name":"ckeditor5-html-embed","label":"ckeditor5-html-embed","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 35.0.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"35.0.1","endInclusive":false}}],"versionsText":"< 35.0.1","eol":null,"hubHref":"/vendor/ckeditor/ckeditor5-html-embed"},{"vendor":"ckeditor","product":"ckeditor5-html-support","name":"ckeditor5-html-support","label":"ckeditor5-html-support","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 35.0.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"35.0.1","endInclusive":false}}],"versionsText":"< 35.0.1","eol":null,"hubHref":"/vendor/ckeditor/ckeditor5-html-support"},{"vendor":"ckeditor","product":"ckeditor5-markdown-gfm","name":"ckeditor5-markdown-gfm","label":"ckeditor5-markdown-gfm","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 35.0.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"35.0.1","endInclusive":false}}],"versionsText":"< 35.0.1","eol":null,"hubHref":"/vendor/ckeditor/ckeditor5-markdown-gfm"},{"vendor":"ubuntu","product":"ckeditor3","name":"ckeditor3","label":"ckeditor3","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ckeditor3","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ldap-account-manager","name":"ldap-account-manager","label":"ldap-account-manager","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ldap-account-manager","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"request-tracker4","name":"request-tracker4","label":"request-tracker4","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/request-tracker4","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"@ckeditor","product":"ckeditor5-html-embed","name":"@ckeditor/ckeditor5-html-embed","label":"ckeditor5-html-embed","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/@ckeditor/ckeditor5-html-embed","purlType":"npm","versions":[{"text":"< 35.0.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"35.0.1","endInclusive":false}}],"versionsText":"< 35.0.1","eol":null,"hubHref":null},{"vendor":"@ckeditor","product":"ckeditor5-html-support","name":"@ckeditor/ckeditor5-html-support","label":"ckeditor5-html-support","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/@ckeditor/ckeditor5-html-support","purlType":"npm","versions":[{"text":"< 35.0.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"35.0.1","endInclusive":false}}],"versionsText":"< 35.0.1","eol":null,"hubHref":null},{"vendor":"@ckeditor","product":"ckeditor5-markdown-gfm","name":"@ckeditor/ckeditor5-markdown-gfm","label":"ckeditor5-markdown-gfm","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/@ckeditor/ckeditor5-markdown-gfm","purlType":"npm","versions":[{"text":"< 35.0.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"35.0.1","endInclusive":false}}],"versionsText":"< 35.0.1","eol":null,"hubHref":null}],"affectedCount":10,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/ckeditor/ckeditor5/security/advisories/GHSA-42wq-rch8-6f6j","label":"github.com/ckeditor/ckeditor5/security/advisories/GHSA-42wq-rch8-6f6j","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","WEB","Third Party Advisory"]},{"url":"https://ckeditor.com/docs/ckeditor5/latest/features/general-html-support.html","label":"ckeditor.com/docs/ckeditor5/latest/features/general-html-support.html","hostname":"ckeditor.com","tags":["X Refsource MISC","REPORT","WEB","Vendor Advisory"]},{"url":"https://ckeditor.com/docs/ckeditor5/latest/features/html-embed.html","label":"ckeditor.com/docs/ckeditor5/latest/features/html-embed.html","hostname":"ckeditor.com","tags":["X Refsource MISC","REPORT","WEB","Vendor Advisory"]},{"url":"https://ckeditor.com/docs/ckeditor5/latest/features/markdown.html","label":"ckeditor.com/docs/ckeditor5/latest/features/markdown.html","hostname":"ckeditor.com","tags":["X Refsource MISC","REPORT","WEB","Vendor Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-31175","label":"ubuntu.com/security/CVE-2022-31175","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-31175","label":"www.cve.org/CVERecord?id=CVE-2022-31175","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31175","label":"nvd.nist.gov/vuln/detail/CVE-2022-31175","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/ckeditor/ckeditor5","label":"github.com/ckeditor/ckeditor5","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-08-03T19:05:13.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-23T17:54:13.307Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 5.8, network access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,1,58],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00905,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2025-04-23T17:54:13.307Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","version":"3.1","headline":true},{"type":"cvss","source":"osv_ubuntu","date":"2025-04-23T17:54:13.307Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},{"type":"cvss","source":"osv_npm","date":"2025-04-23T17:54:13.307Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","version":"3.1"},{"type":"cvss","source":"nvd","date":"2025-04-23T17:54:13.307Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2025-04-23T14:02:28.383Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"none"}],"epss":{"value":0.00905,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T06:02:28.822Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T06:02:29.295Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T06:02:29.506Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T06:00:56.363Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T06:02:27.202Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T06:02:26.240Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T06:29:48.410Z","stale":false,"partial":false}}