CVE-2026-32870: Kirby has XML injection in its XML creator toolkit

Published Apr 23, 2026
·
Updated

TL;DR

This vulnerability only affects Kirby sites that use the Xml data handler (e.g. Data::encode($string, 'xml')) or the Xml::create(), Xml::tag() or Xml::value() method(s) in site or plugin code. The Kirby core does not use any of the affected methods.

If consumers use an affected method and cannot rule out input to these methods controlled by an attacker, Kirby strongly recommends that they update to a patch release.

----

Introduction

XML strings contain structured data in tags and attributes. Depending on the used XML schema, this data can carry specific meaning that can lead to actions in other systems that parse and act on the XML data. Tags and attributes are detected based on their specific syntax, which includes characters such as <, >, ", and &. If these characters are to be used verbatim in text within the XML string, they can be escaped using a <![CDATA[ ]]> block.

XML injection is an attack on a system generating or parsing XML files. By injecting special characters into input data, XML output with a malicious meaning could be generated by a vulnerable system.

Impact

Kirby's Xml::value() method has special handling for <![CDATA[ ]]> blocks. If the input value is already valid CDATA, it is not escaped a second time but allowed to pass through. However it was possible to trick this check into allowing values that only contained a valid CDATA block but also contained other structured data outside of the CDATA block. This structured data would then also be allowed to pass through, circumventing the value protection.

The Xml::value() method is used in Xml::tag(), Xml::create() and in the Xml data handler (e.g. Data::encode($string, 'xml')).

Both the vulnerable methods and the data handler are not used in the Kirby core. However they may be used in site or plugin code, e.g. to create XML strings from input data. If those generated files are passed to another implementation that assigns specific meaning to the XML schema, manipulation of this system's behavior is possible.

Kirby sites that don't use XML generation in site or plugin code are not affected.

Patches

The problem has been patched in Kirby 4.9.0 and Kirby 5.4.0. Please update to one of these or a later version to fix the vulnerability.

In all of the mentioned releases, Kirby has added additional checks that only allow unchanged CDATA passthrough if the entire string is made up of valid CDATA blocks and no structured data. This protects all uses of the method against the described vulnerability.

Credits

Kirby thanks to Patrick Falb (@dapatrese) at FORMER 03 for responsibly reporting the identified issue.

Other sources

Kirby is an open-source content management system. Kirby's Xml::value() method has special handling for <![CDATA[ ]]> blocks. If the input value is already valid CDATA, it is not escaped a second time but allowed to pass through. However, prior to versions 4.9.0 and 5.4.0, it was possible to trick this check into allowing values that only contained a valid CDATA block but also contained other structured data outside of the CDATA block. This structured data would then also be allowed to pass through, circumventing the value protection. The Xml::value() method is used in Xml::tag(), Xml::create() and in the Xml data handler (e.g. Data::encode($string, 'xml')). Both the vulnerable methods and the data handler are not used in the Kirby core. However they may be used in site or plugin code, e.g. to create XML strings from input data. If those generated files are passed to another implementation that assigns specific meaning to the XML schema, manipulation of this system's behavior is possible. Kirby sites that don't use XML generation in site or plugin code are not affected. The problem has been patched in Kirby 4.9.0 and Kirby 5.4.0. In all of the mentioned releases, Kirby has added additional checks that only allow unchanged CDATA passthrough if the entire string is made up of valid CDATA blocks and no structured data. This protects all uses of the method against the described vulnerability.

MITRE

Affected Software

4 affected componentsFixes available
composer/getkirby/cms>=5.0.0<5.4.0
5.4.0
composer/getkirby/cms<4.9.0
4.9.0
getkirby Kirby<4.9.0
getkirby Kirby>=5.0.0<5.4.0

Event History

Apr 23, 2026
Advisory Published
via GitHub·09:21 PM
Data Sourced
via GitHub·09:21 PM
DescriptionWeaknessAffected Software
Apr 24, 2026
CVE Published
via MITRE·12:19 AM
Data Sourced
via MITRE·12:19 AM
DescriptionWeakness
Data Sourced
via NVD·01:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-32870?

CVE-2026-32870 has a critical severity due to the potential for XML injection attacks.

2

How do I fix CVE-2026-32870?

To fix CVE-2026-32870, upgrade to Kirby version 4.9.0 or 5.4.0.

3

Which versions of Kirby are affected by CVE-2026-32870?

CVE-2026-32870 affects Kirby versions from 5.0.0 to 5.4.0 and all versions below 4.9.0.

4

What methods in Kirby are vulnerable in CVE-2026-32870?

The methods Xml::create(), Xml::tag(), Xml::value(), and Data::encode($string, 'xml') are vulnerable in CVE-2026-32870.

5

Is the Kirby core affected by CVE-2026-32870?

No, the core of Kirby is not affected by CVE-2026-32870; it only affects custom site or plugin code using the XML handling methods.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203