Skip to content

← Actionable
Medium, CVSS 5.8amended

CKEditor5 cross-site scripting vulnerability caused by the editor instance destroying process

CVE-2022-31175GHSA-42wq-rch8-6f6j

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (@ckeditor/ckeditor5-markdown-gfm 35.0.1; @ckeditor/ckeditor5-html-embed 35.0.1; @ckeditor/ckeditor5-html-support 35.0.1), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
5.8 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L
EPSS
  • CVE-2022-31175: 0.88% estimated exploitation activity in the next 30 days; percentile 59.25 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Affected packages @ckeditor/ckeditor5-markdown-gfm @ckeditor/ckeditor5-html-support @ckeditor/ckeditor5-html-embed Impact A cross-site scripting vulnerability has been discovered affecting three optional CKEditor 5's packages. The vulnerability allowed to trigger a JavaScript code after fulfilling special conditions: a) 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, b) Initializing the editor on an element and using an element other than <textarea as a base, c) Destroying the editor instance. 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.…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-42wq-rch8-6f6j

  2. Revision 1 · created ·

    Published from osv record GHSA-42wq-rch8-6f6j

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2022-31175

Advisory: CKEditor5 cross-site scripting vulnerability caused by the editor instance destroying process
IDs: CVE-2022-31175, GHSA-42wq-rch8-6f6j
Record: https://patchnext.com/advisories/cve-2022-31175 (revision 2, source checked 26 Oct 2026, 12:17 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.8)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: @ckeditor/ckeditor5-markdown-gfm 35.0.1; @ckeditor/ckeditor5-html-embed 35.0.1; @ckeditor/ckeditor5-html-support 35.0.1. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm @ckeditor/ckeditor5-markdown-gfm: affected < 35.0.1; fixed in 35.0.1
- npm @ckeditor/ckeditor5-html-embed: affected < 35.0.1; fixed in 35.0.1
- npm @ckeditor/ckeditor5-html-support: affected < 35.0.1; fixed in 35.0.1

## Suggested inspection (read-only)
- `npm ls @ckeditor/ckeditor5-markdown-gfm --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @ckeditor/ckeditor5-html-embed --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @ckeditor/ckeditor5-html-support --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on @ckeditor/ckeditor5-markdown-gfm, @ckeditor/ckeditor5-html-embed, @ckeditor/ckeditor5-html-support.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-42wq-rch8-6f6j (OSV record GHSA-42wq-rch8-6f6j lists affected ranges: npm @ckeditor/ckeditor5-markdown-gfm >=0 =0 =0 <35.0.1 (fixed))
- Verified: https://github.com/advisories/GHSA-42wq-rch8-6f6j (GitHub-reviewed advisory GHSA-42wq-rch8-6f6j lists affected ranges: npm @ckeditor/ckeditor5-markdown-gfm >=0 =0 =0 <35.0.1)

Commands are suggestions: review each one before running it.

Loading voting…