{"answers":{"affected":"6 open source packages ship an affected version, including @ckeditor/ckeditor5-html-embed, @ckeditor/ckeditor5-html-support and @ckeditor/ckeditor5-markdown-gfm. It affects 3 products.","exploited":"There is no known exploitation of CVE-2022-31175 in the wild and no public exploit code.","fix":"Upgrade @ckeditor/ckeditor5-html-embed to 35.0.1 or later.","what":"CVE-2022-31175 is a medium-severity cross-site scripting vulnerability in ckeditor5, published on 3 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-31175 and fix it if it is affected.\n\nWhat it is: CVE-2022-31175 is a medium-severity cross-site scripting vulnerability in ckeditor5, published on 3 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2022-31175 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @ckeditor/ckeditor5-html-embed (npm): affected all versions; fixed in 35.0.1\n- @ckeditor/ckeditor5-html-embed (npm): affected all versions; fixed in 35.0.1\n- @ckeditor/ckeditor5-html-support (npm): affected all versions; fixed in 35.0.1\n- @ckeditor/ckeditor5-html-support (npm): affected all versions; fixed in 35.0.1\n- @ckeditor/ckeditor5-markdown-gfm (npm): affected all versions; fixed in 35.0.1\n- @ckeditor/ckeditor5-markdown-gfm (npm): affected all versions; fixed in 35.0.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31175/ (Markdown: https://insights.sbomify.com/CVE-2022-31175/index.md)","id":"CVE-2022-31175","markdown":"https://insights.sbomify.com/CVE-2022-31175/index.md","name":"CVE-2022-31175","record":{"aliases":["GHSA-42wq-rch8-6f6j","UBUNTU-CVE-2022-31175"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"JavaScript rich text editor","requires_auth":"none","summary":"Cross-site scripting in CKEditor 5 allows JavaScript execution when destroying and reinitializing the editor with unsafe markup enabled.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"ckeditor5-html-embed","vendor":"ckeditor"},{"product":"ckeditor5-html-support","vendor":"ckeditor"},{"product":"ckeditor5-markdown-gfm","vendor":"ckeditor"}],"cvss":{"score":5.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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 `\u003ctextarea\u003e` 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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Cross-site scripting caused by the editor instance destroying process in ckeditor5","id":"CVE-2022-31175","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2022"},"n_packages":6,"n_references":4,"next":{"headline":"Grafana Image Renderer leaking files","id":"CVE-2022-31176"},"packages":[{"ecosystem":"npm","fixed":["35.0.1"],"introduced":["0"],"last_affected":[],"package":"@ckeditor/ckeditor5-html-embed","purl":null,"source":"GHSA-42wq-rch8-6f6j"},{"ecosystem":"npm","fixed":["35.0.1"],"introduced":["0"],"last_affected":[],"package":"@ckeditor/ckeditor5-html-embed","purl":"pkg:npm/%40ckeditor/ckeditor5-html-embed","source":"GHSA-42wq-rch8-6f6j"},{"ecosystem":"npm","fixed":["35.0.1"],"introduced":["0"],"last_affected":[],"package":"@ckeditor/ckeditor5-html-support","purl":null,"source":"GHSA-42wq-rch8-6f6j"},{"ecosystem":"npm","fixed":["35.0.1"],"introduced":["0"],"last_affected":[],"package":"@ckeditor/ckeditor5-html-support","purl":"pkg:npm/%40ckeditor/ckeditor5-html-support","source":"GHSA-42wq-rch8-6f6j"},{"ecosystem":"npm","fixed":["35.0.1"],"introduced":["0"],"last_affected":[],"package":"@ckeditor/ckeditor5-markdown-gfm","purl":null,"source":"GHSA-42wq-rch8-6f6j"},{"ecosystem":"npm","fixed":["35.0.1"],"introduced":["0"],"last_affected":[],"package":"@ckeditor/ckeditor5-markdown-gfm","purl":"pkg:npm/%40ckeditor/ckeditor5-markdown-gfm","source":"GHSA-42wq-rch8-6f6j"}],"prev":{"headline":"Juniper is vulnerable to @DOS GraphQL Nested Fragments overflow","id":"CVE-2022-31173"},"products":["ckeditor5"],"published":"2022-08-03","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["ckeditor"]},"summary":"Cross-site scripting in CKEditor 5 allows JavaScript execution when destroying and reinitializing the editor with unsafe markup enabled.","url":"https://insights.sbomify.com/CVE-2022-31175/"}