CVE-2022-31175Cross-site scripting caused by the editor instance destroying process in ckeditor5
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.
What to do
Fixed builds are available from npm: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | ldap-account-manager | Under investigation | UBUNTU-CVE-2022-31175 | |
| Ubuntu 26.04 | request-tracker4 | Under investigation | UBUNTU-CVE-2022-31175 | |
| Ubuntu 25.10 | ckeditor | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | ldap-account-manager | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | UBUNTU-CVE-2022-31175 | |
| Ubuntu 25.10 | request-tracker4 | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | UBUNTU-CVE-2022-31175 | |
| Ubuntu 24.04 | ckeditor3 | Under investigation | UBUNTU-CVE-2022-31175 | |
| Ubuntu 24.04 | ldap-account-manager | Under investigation | UBUNTU-CVE-2022-31175 | |
| Ubuntu 24.04 | request-tracker4 | Under investigation | UBUNTU-CVE-2022-31175 | |
| Ubuntu 22.04 | ckeditor3 | Under investigation | UBUNTU-CVE-2022-31175 | |
| Ubuntu 22.04 | ldap-account-manager | Under investigation | UBUNTU-CVE-2022-31175 | |
| Ubuntu 22.04 | request-tracker4 | Under investigation | UBUNTU-CVE-2022-31175 | |
| Ubuntu 20.04 | ckeditor3 | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | UBUNTU-CVE-2022-31175 | |
| Ubuntu 20.04 | ldap-account-manager | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | UBUNTU-CVE-2022-31175 | |
| Ubuntu 20.04 | request-tracker4 | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | UBUNTU-CVE-2022-31175 | |
| Ubuntu 18.04 | ckeditor3 | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | UBUNTU-CVE-2022-31175 | |
| Ubuntu 18.04 | ldap-account-manager | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | UBUNTU-CVE-2022-31175 | |
| Ubuntu 18.04 | request-tracker4 | Fix pending | UBUNTU-CVE-2022-31175 | |
| Ubuntu 16.04 | ckeditor | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | ||
| Ubuntu 16.04 | ldap-account-manager | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | UBUNTU-CVE-2022-31175 | |
| Ubuntu 16.04 | request-tracker4 | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | UBUNTU-CVE-2022-31175 | |
| Ubuntu 14.04 | ckeditor | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | ||
| Ubuntu 14.04 | ldap-account-manager | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | ||
| Ubuntu 14.04 | request-tracker4 | Will not fix embedded copies of ckeditor are in ldap-account-manager, rt4, and rt5 | ||
| npm library | @ckeditor/ckeditor5-html-embed | Fixed | 35.0.1 | GHSA-42wq-rch8-6f6j |
| npm library | @ckeditor/ckeditor5-html-support | Fixed | 35.0.1 | GHSA-42wq-rch8-6f6j |
| npm library | @ckeditor/ckeditor5-markdown-gfm | Fixed | 35.0.1 | GHSA-42wq-rch8-6f6j |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- ckeditor5: affected: < 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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.