# CVE-2021-41252: Cross-site scripting (XSS) from writer field content in the site frontend

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.3
- **CVSS:** 7.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.93% (percentile 59, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** GHSA-x7j7-qp7j-hw3q
- **Published:** 2021-11-16T17:04:19.000Z
- **Modified:** 2026-07-08T06:28:24.420Z

## Who should check

- Projects that depend on Packagist package getkirby/cms (\>= 3.5.0, \< 3.5.8)
- Anyone running getkirby kirby \>= 3.5.0, \< 3.5.8

## Description

Kirby is an open source file structured CMS \#\#\# Impact Kirby's writer field stores its formatted content as HTML code. Unlike with other field types, it is not possible to escape HTML special characters against cross-site scripting (XSS) attacks, otherwise the formatting would be lost. If the user is logged in to the Panel, a harmful script can for example trigger requests to Kirby's API with the permissions of the victim. Because the writer field did not securely sanitize its contents on save, it was possible to inject malicious HTML code into the content file by sending it to Kirby's API directly without using the Panel. This malicious HTML code would then be displayed on the site frontend and executed in the browsers of site visitors and logged in users who are browsing the site. Attackers must be in your group of authenticated Panel users in order to exploit this weakness. Users who do not make use of the writer field are not affected. This issue has been patched in Kirby 3.5.8 by sanitizing all writer field contents on the backend whenever the content is modified via Kirby's API. Please update to this or a later version to fix the vulnerability.

## Affected and fixed versions

- Packagist `getkirby/cms`: affected \>= 3.5.0, \< 3.5.8; fixed 3.5.8 (osv)
- getkirby kirby: \>= 3.5.0, \< 3.5.8 (cvelist)

## Mitigation

- Upgrade getkirby/cms to 3.5.8 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-41252. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-41252.md
Affected: getkirby/cms >= 3.5.0, < 3.5.8
Fixed in: 3.5.8

Steps:
1. Search this machine and project for getkirby/cms (Packagist), getkirby kirby: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-41252 being exploited?

There is no confirmed exploitation: CVE-2021-41252 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.93% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-41252?

High: CVSS 7.3 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2021-41252?

getkirby/cms \>= 3.5.0, \< 3.5.8.

### Is there a fix for CVE-2021-41252?

Yes. Fixed in 3.5.8. Upgrade getkirby/cms to 3.5.8 or later.

### How do I check if I'm affected by CVE-2021-41252?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/getkirby/kirby/security/advisories/GHSA-x7j7-qp7j-hw3q>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-41252>
- patch: <https://github.com/getkirby/kirby/commit/25fc5c6b330442e6433c99befc688f3698c5d1fc>
- other: <https://github.com/getkirby/kirby/releases/tag/3.5.8>
- other: <https://github.com/getkirby/kirby>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-41252>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-x7j7-qp7j-hw3q> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-41252> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-41252>
