# CVE-2021-41258: Cross-site scripting (XSS) from image block content in the site frontend

- Severity: High 7.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.81%, higher than 57% of CVEs (2026-12-01)
- Published: 2021-11-16T17:04:41.000Z
- Modified: 2026-07-08T06:29:53.438Z
- Also known as: GHSA-cq58-r77c-5jjw
- Weaknesses: CWE-79, CWE-80
- Assigned by: GitHub_M

## Description

Kirby is an open source file structured CMS. In affected versions Kirby's blocks field stores structured data for each block. This data is then used in block snippets to convert the blocks to HTML for use in your templates. We recommend to escape HTML special characters to protect against cross-site scripting (XSS) attacks. The default snippet for the image block unfortunately did not use our escaping helper. This made it possible to include malicious HTML code in the source, alt and link fields of the image block, which 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 blocks field are not affected. This issue has been patched in Kirby version 3.5.8 by escaping special HTML characters in the output from the default image block snippet. Please update to this or a later version to fix the vulnerability.

(As written by CVE List.)

## Affected

- getkirby kirby: >= 3.5.0, < 3.5.8; from 3.5.0 up to 3.5.7.1
- getkirby/cms (Packagist): from 3.5.0 before 3.5.8

## Every score

- GitHub_M: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 2.1 Low `AV:N/AC:H/Au:S/C:N/I:P/A:N`

## References

- <https://github.com/getkirby/kirby/releases/tag/3.5.8> (release-notes, third-party-advisory, web)
- <https://github.com/getkirby/kirby/security/advisories/GHSA-cq58-r77c-5jjw> (third-party-advisory, web)
- <https://github.com/getkirby/kirby/pull/3510> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-41258> (advisory)
- <https://github.com/getkirby/kirby> (package)

## Sources

- CVE List: [CVE-2021-41258](https://www.cve.org/CVERecord?id=CVE-2021-41258), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-cq58-r77c-5jjw](https://github.com/advisories/GHSA-cq58-r77c-5jjw), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-41258](https://nvd.nist.gov/vuln/detail/CVE-2021-41258), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-41258 · Whole record: https://cve.day/CVE-2021-41258.json · Rebuilt by cve.day 2026-11-25T22:58:05.588Z
