All vulnerabilities

Servers and applications

GHSA-45c7-fxc7-4wjh

Cross-site scripting (XSS) from incomplete SVG and XML sanitization in `Dom::sanitize()`

Severity
High 7.4
Published
16 Sept 2026
Last changed
16 Sept 2026
Added to UpHeron
3 Nov 2026
Fixed in
5.6.0
Weakness
Cross-site scripting (CWE-79)CWE-87
Attack
Over the network · Only under certain conditions · Needs a user account · Needs someone to view a page or file
Attacker can
Read data · Change data
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Sources
Project advisories (GitHub)

Description

This vulnerability affects Kirby sites that embed SVG/XML content inline, e.g. an uploaded SVG rendered with the svg() helper. It requires an authenticated Panel user who can upload files, or other code that passes untrusted SVG/XML through Sane or Dom classes.

Sites that deliver uploaded SVG files the way Kirby does by default (from their media URL, as or as a standalone image/svg+xml` document) are not affected.

In affected releases, Dom::sanitize() inspected only elements and attributes, so comments and CDATA sections were carried into the sanitized document unchanged. An SVG or XML file could therefore hold markup that the XML parser considered safe/inert, but became active as soon as the document is embedded inline in an HTML page.

Where a template renders such a file inline, the injected script runs in the browser of everyone who views that page. As the Panel is served from the same origin as the site frontend, this lets a lower-privileged editor act with the permissions of…

From getkirby/kirby's security advisory. Shortened; the full text is there.

Workarounds

Until you can update, either of these removes the exposure:

  • Stop embedding uploaded SVG files inline. Deliver them from their media URL or with instead of e.g. the svg()` helper.
  • Do not accept SVG uploads from users you do not fully trust.
Workarounds as given by getkirby/kirby's security advisory.

Affected software

SoftwareAffected versions
KirbyServers and applications · github:getkirby/kirby
  • From 5.0.0 before 5.6.0

About Kirby

proprietary flat-file content management system

From Wikidata, CC0 1.0.
Monthly downloads (Packagist)
52,017Packagist, 15 Nov 2026
Total downloads (Packagist)
731,120Packagist, 15 Nov 2026
GitHub stars
1,539GitHub, 15 Nov 2026
Forks
195GitHub, 15 Nov 2026
Latest release
5.6.3GitHub, 15 Nov 2026
Released
5 Nov 2026GitHub
Written in
PHP, Vue.jsWikidata
First published on GitHub
6 Oct 2017GitHub

Release lines

ReleaseLatestSecurity fixes
55.6.3Yes
3.103.10.1.2Ended 27 Nov 2025
4 (A new era)4.9.7Until 28 Nov 2026
3.9 (Brookesia)3.9.8.3Ended 27 Nov 2025
3.8 (Rhampholeon)3.8.4.4Ended 16 Jan 2025
3.7 (Kinyongia)3.7.5.5Ended 5 Oct 2024

From endoflife.date.

References