Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS00MndxLXJjaDgtNmY2as4AAt2p

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

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.

Patches

The problem has been recognized and patched. The fix will be available in version 35.0.1.

For more information

Email us at [email protected] if you have any questions or comments about this advisory.

Permalink: https://github.com/advisories/GHSA-42wq-rch8-6f6j
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS00MndxLXJjaDgtNmY2as4AAt2p
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 1 year ago
Updated: about 1 year ago


CVSS Score: 5.8
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L

Identifiers: GHSA-42wq-rch8-6f6j, CVE-2022-31175
References: Repository: https://github.com/ckeditor/ckeditor5
Blast Radius: 15.2

Affected Packages

npm:@ckeditor/ckeditor5-html-embed
Dependent packages: 572
Dependent repositories: 379
Downloads: 146,844 last month
Affected Version Ranges: < 35.0.1
Fixed in: 35.0.1
All affected versions: 0.0.1, 23.1.0, 24.0.0, 25.0.0, 26.0.0, 27.0.0, 27.1.0, 28.0.0, 29.0.0, 29.1.0, 29.2.0, 30.0.0, 31.0.0, 31.1.0, 32.0.0, 33.0.0, 34.0.0, 34.1.0, 34.2.0, 35.0.0
All unaffected versions: 35.0.1, 35.1.0, 35.2.0, 35.2.1, 35.3.0, 35.3.1, 35.3.2, 35.4.0, 36.0.0, 36.0.1, 37.0.0, 37.0.1, 37.1.0, 38.0.0, 38.0.1, 38.1.0, 38.1.1, 39.0.0, 39.0.1, 39.0.2, 40.0.0, 40.1.0, 40.2.0, 41.0.0, 41.1.0, 41.2.0, 41.2.1, 41.3.0, 41.3.1
npm:@ckeditor/ckeditor5-html-support
Dependent packages: 496
Dependent repositories: 421
Downloads: 259,086 last month
Affected Version Ranges: < 35.0.1
Fixed in: 35.0.1
All affected versions: 29.0.0, 29.1.0, 29.2.0, 30.0.0, 31.0.0, 31.1.0, 32.0.0, 33.0.0, 34.0.0, 34.1.0, 34.2.0, 35.0.0
All unaffected versions: 35.0.1, 35.1.0, 35.2.0, 35.2.1, 35.3.0, 35.3.1, 35.3.2, 35.4.0, 36.0.0, 36.0.1, 37.0.0, 37.0.1, 37.1.0, 38.0.0, 38.0.1, 38.1.0, 38.1.1, 39.0.0, 39.0.1, 39.0.2, 40.0.0, 40.1.0, 40.2.0, 41.0.0, 41.1.0, 41.2.0, 41.2.1, 41.3.0, 41.3.1
npm:@ckeditor/ckeditor5-markdown-gfm
Dependent packages: 434
Dependent repositories: 258
Downloads: 86,663 last month
Affected Version Ranges: < 35.0.1
Fixed in: 35.0.1
All affected versions: 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 10.0.0, 10.0.1, 10.0.2, 10.0.3, 10.0.4, 11.0.0, 11.0.1, 11.0.2, 11.0.3, 11.0.4, 11.0.5, 15.0.0, 16.0.0, 17.0.0, 18.0.0, 19.0.0, 19.0.1, 20.0.0, 21.0.0, 22.0.0, 23.0.0, 23.1.0, 24.0.0, 25.0.0, 26.0.0, 27.0.0, 27.1.0, 28.0.0, 29.0.0, 29.1.0, 29.2.0, 30.0.0, 31.0.0, 31.1.0, 32.0.0, 33.0.0, 34.0.0, 34.1.0, 34.2.0, 35.0.0
All unaffected versions: 35.0.1, 35.1.0, 35.2.0, 35.2.1, 35.3.0, 35.3.1, 35.3.2, 35.4.0, 36.0.0, 36.0.1, 37.0.0, 37.0.1, 37.1.0, 38.0.0, 38.0.1, 38.1.0, 38.1.1, 39.0.0, 39.0.1, 39.0.2, 40.0.0, 40.1.0, 40.2.0, 41.0.0, 41.1.0, 41.2.0, 41.2.1, 41.3.0, 41.3.1