Cross-site scripting caused by the editor instance destroying process in ckeditor5
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ckeditor | ckeditor5 | before 35.0.1 | 35.0.1 | Patch available | CNA |
| — | @ckeditor/ckeditor5-markdown-gfm (npm) | before 35.0.1 | 35.0.1 | Patch available | GHSA-42wq-rch8-6f6j |
| — | @ckeditor/ckeditor5-html-support (npm) | before 35.0.1 | 35.0.1 | Patch available | GHSA-42wq-rch8-6f6j |
| — | @ckeditor/ckeditor5-html-embed (npm) | before 35.0.1 | 35.0.1 | Patch available | GHSA-42wq-rch8-6f6j |
- ckeditor5 Vendorckeditor Affected before 35.0.1 Fixed in 35.0.1 Patch available CNA
- @ckeditor/ckeditor5-markdown-gfm (npm) Vendor— Affected before 35.0.1 Fixed in 35.0.1 Patch available GHSA-42wq-rch8-6f6j
- @ckeditor/ckeditor5-html-support (npm) Vendor— Affected before 35.0.1 Fixed in 35.0.1 Patch available GHSA-42wq-rch8-6f6j
- @ckeditor/ckeditor5-html-embed (npm) Vendor— Affected before 35.0.1 Fixed in 35.0.1 Patch available GHSA-42wq-rch8-6f6j
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:ckeditor:ckeditor5-html-embed:*:*:*:*:*:node.js:*:* | before 35.0.1 | Vulnerable | ckeditor |
| cpe:2.3:a:ckeditor:ckeditor5-html-support:*:*:*:*:*:node.js:*:* | before 35.0.1 | Vulnerable | ckeditor |
| cpe:2.3:a:ckeditor:ckeditor5-markdown-gfm:*:*:*:*:*:node.js:*:* | before 35.0.1 | Vulnerable | ckeditor |
- cpe:2.3:a:ckeditor:ckeditor5-html-embed:*:*:*:*:*:node.js:*:* Versions before 35.0.1 Vulnerable ·ckeditor
- cpe:2.3:a:ckeditor:ckeditor5-html-support:*:*:*:*:*:node.js:*:* Versions before 35.0.1 Vulnerable ·ckeditor
- cpe:2.3:a:ckeditor:ckeditor5-markdown-gfm:*:*:*:*:*:node.js:*:* Versions before 35.0.1 Vulnerable ·ckeditor
Remediation
- Fix · CNA ckeditor5 (ckeditor) Fixed in 35.0.1
- Fix · GHSA-42wq-rch8-6f6j @ckeditor/ckeditor5-markdown-gfm (npm) Fixed in 35.0.1 Advisory →
- Fix · GHSA-42wq-rch8-6f6j @ckeditor/ckeditor5-html-support (npm) Fixed in 35.0.1 Advisory →
- Fix · GHSA-42wq-rch8-6f6j @ckeditor/ckeditor5-html-embed (npm) Fixed in 35.0.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2022-31175
- 2026-10-03 Alias added: GHSA-42wq-rch8-6f6j
References
Advisory 5
- 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://nvd.nist.gov/vuln/detail/CVE-2022-31175
Sources
- CVE-2022-31175 · CVE Program
- CVE-2022-31175 · NVD
- FIRST EPSS
- GHSA-42wq-rch8-6f6j · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences