Miggo Logo

CVE-2023-4771:
CKEditor cross-site scripting vulnerability in AJAX sample

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.95167%
Published
2/7/2024
Updated
2/7/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
ckeditor4npm< 4.24.0-lts4.24.0-lts

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the AJAX sample's insecure handling of editor content. The original code in samples/old/ajax.html used document.getElementById('editorcontents').innerHTML = editor.getData(), which directly injected raw HTML without sanitization. This allowed execution of arbitrary JavaScript if the content contained malicious scripts. The patch replaced innerHTML with .value on a textarea, which neutralizes the XSS risk. The vulnerable function is saveData(), which implemented the unsafe innerHTML assignment. The core CKEditor functions (e.g., getData()) are not inherently vulnerable, but the sample's misuse of the API introduced the XSS vector.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### *****t** p**k***s T** vuln*r**ility **s ***n *is*ov*r** in t** *J*X s*mpl* *v*il**l* *t t** `s*mpl*s/ol*/*j*x.*tml` *il* lo**tion. *ll int**r*tors t**t us* t**t s*mpl* in t** pro*u*tion *o** **n ** *****t**. ### Imp**t * pot*nti*l vuln*r**ility

Reasoning

T** vuln*r**ility st*ms *rom t** *J*X s*mpl*'s ins**ur* **n*lin* o* **itor *ont*nt. T** ori*in*l *o** in `s*mpl*s/ol*/*j*x.*tml` us** `*o*um*nt.**t*l*m*nt*yI*('**itor*ont*nts').inn*r*TML = **itor.**t**t*()`, w*i** *ir**tly inj**t** r*w *TML wit*out s