# CVE-2022-31175: Cross-site scripting caused by the editor instance destroying process in ckeditor5

- Priority: **Routine**
- Reason: Not severe (CVSS 5.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-08-03 · Modified: 2025-04-23
- Aliases: UBUNTU-CVE-2022-31175, GHSA-42wq-rch8-6f6j
- Record: https://cvemate.com/vulnerability/CVE-2022-31175 · JSON: https://cvemate.com/vulnerability/CVE-2022-31175/json

## Description

```text
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.
```

## Signals

- CVSS: 5.8 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L
- EPSS: 0.905%, percentile 61.042%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- ckeditor ckeditor5: \< 35.0.1
- ckeditor ckeditor5-html-embed: \< 35.0.1
- ckeditor ckeditor5-html-support: \< 35.0.1
- ckeditor ckeditor5-markdown-gfm: \< 35.0.1
- ubuntu ckeditor3 (Ubuntu): All versions (No fix recorded)
- ubuntu ldap-account-manager (Ubuntu): All versions (No fix recorded)
- ubuntu request-tracker4 (Ubuntu): All versions (No fix recorded)
- @ckeditor ckeditor5-html-embed (Npm): \< 35.0.1
- @ckeditor ckeditor5-html-support (Npm): \< 35.0.1
- @ckeditor ckeditor5-markdown-gfm (Npm): \< 35.0.1

## References

- <https://github.com/ckeditor/ckeditor5/security/advisories/GHSA-42wq-rch8-6f6j>
- <https://ckeditor.com/docs/ckeditor5/latest/features/general-html-support.html>
- <https://ckeditor.com/docs/ckeditor5/latest/features/html-embed.html>
- <https://ckeditor.com/docs/ckeditor5/latest/features/markdown.html>
- <https://ubuntu.com/security/CVE-2022-31175>
- <https://www.cve.org/CVERecord?id=CVE-2022-31175>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31175>
- <https://github.com/ckeditor/ckeditor5>

---

Data as of 2026-12-05T04:47:32.052Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
