# CVE-2024-24815: CKEditor4 Cross-site scripting (XSS) vulnerability caused by incorrect CDATA detection

> Attackers can inject malicious JavaScript via malformed HTML in CKEditor4 when full-page editing or specific CDATA filtering is enabled.

- **Severity:** Medium 6.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 7 Feb 2024
- **Updated:** 13 Feb 2025
- **Also known as:** DEBIAN-CVE-2024-24815, GHSA-fq6h-4g8v-qqvm, UBUNTU-CVE-2024-24815, openSUSE-SU-2024:14557-1, openSUSE-SU-2025:0008-1

## What is CVE-2024-24815?

CVE-2024-24815 is a medium-severity cross-site scripting vulnerability in ckeditor4, published on 7 Feb 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

CKEditor4 is an open source what-you-see-is-what-you-get HTML editor. A cross-site scripting vulnerability has been discovered in the core HTML parsing module in versions of CKEditor4 prior to 4.24.0-lts. It may affect all editor instances that enabled full-page editing mode or enabled CDATA elements in Advanced Content Filtering configuration (defaults to `script` and `style` elements). The vulnerability allows attackers to inject malformed HTML content bypassing Advanced Content Filtering mechanism, which could result in executing JavaScript code. An attacker could abuse faulty CDATA content detection and use it to prepare an intentional attack on the editor. A fix is available in version 4.24.0-lts.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2024-24815?

4 open source packages ship an affected version, including ckeditor4 and ckeditor/ckeditor. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ckeditor4` | npm | All versions | 4.24.0-lts |
| `ckeditor4` | npm | All versions | 4.24.0-lts |
| `ckeditor/ckeditor` | Packagist | All versions | 4.24.0 |
| `ckeditor/ckeditor` | Packagist | All versions | 4.24.0 |
| `python-django-ckeditor` | SUSE:Package Hub 15 SP5 | All versions | 6.7.2-bp155.3.3.1 |
| `python-django-ckeditor` | openSUSE:Leap 15.5 | All versions | 6.7.2-bp155.3.3.1 |
| `python-django-ckeditor` | openSUSE:Tumbleweed | All versions | 6.7.2-1.1 |

Products: Ckeditor Ckeditor.

## How do I fix CVE-2024-24815?

Upgrade ckeditor4 to 4.24.0-lts or later.

## Is CVE-2024-24815 being exploited?

There is no known exploitation of CVE-2024-24815 in the wild and no public exploit code.

## Other vulnerabilities in ckeditor4

- [CVE-2023-31541](https://insights.sbomify.com/CVE-2023-31541/): File upload in n/a (critical 9.8)
- [CVE-2021-41164](https://insights.sbomify.com/CVE-2021-41164/): Advanced Content Filter (ACF) vulnerability allowing to execute JavaScript code using malformed HTML (high 8.2)
- [CVE-2021-41165](https://insights.sbomify.com/CVE-2021-41165/): HTML comments vulnerability allowing to execute JavaScript code (high 8.2)
- [CVE-2021-32808](https://insights.sbomify.com/CVE-2021-32808/): Cross-site scripting in ckeditor via abuse of undo functionality (high 7.6)
- [CVE-2011-4972](https://insights.sbomify.com/CVE-2011-4972/): Missing authorization in CKEditor Drupal module (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-24815 and fix it if it is affected.

What it is: CVE-2024-24815 is a medium-severity cross-site scripting vulnerability in ckeditor4, published on 7 Feb 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-24815 in the wild and no public exploit code.

Affected packages and fixed versions:
- ckeditor4 (npm): affected all versions; fixed in 4.24.0-lts
- ckeditor4 (npm): affected all versions; fixed in 4.24.0-lts
- ckeditor/ckeditor (Packagist): affected all versions; fixed in 4.24.0
- ckeditor/ckeditor (Packagist): affected all versions; fixed in 4.24.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-24815/ (Markdown: https://insights.sbomify.com/CVE-2024-24815/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-24815
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-24815
- OSV: https://osv.dev/vulnerability/CVE-2024-24815

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-24815/
Summaries are generated and may contain mistakes; the official description above is the record.
