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.
Kirby CMS versions before 4.9.0 and 5.4.0 contain an XML injection vulnerability in the Xml::value() method that fails to properly escape CDATA blocks, allowing attackers to inject malicious XML content. This vulnerability affects custom code using Xml methods or the XML data handler to process untrusted input.
تحتوي طريقة Xml::value() في Kirby على معالجة خاصة لكتل CDATA التي تسمح بمرور القيم الصحيحة دون الهروب الثاني. قبل الإصدارات 4.9.0 و 5.4.0، كان من الممكن خداع هذا الفحص للسماح بقيم تحتوي على كتلة CDATA صحيحة بالإضافة إلى بيانات منظمة أخرى خارج كتلة CDATA. هذا يسمح بحقن محتوى XML ضار عبر المدخلات غير الموثوقة.
نظام إدارة المحتوى Kirby في الإصدارات السابقة للإصدار 4.9.0 و 5.4.0 يحتوي على ثغرة حقن XML في طريقة Xml::value() التي تفشل في الهروب الصحيح من كتل CDATA. هذه الثغرة تؤثر على الأكواد المخصصة التي تستخدم طرق XML أو معالج بيانات XML لمعالجة المدخلات غير الموثوقة.
Update Kirby to version 4.9.0 or 5.4.0 or later immediately. Review all custom code and plugins using Xml::value(), Xml::tag(), Xml::create() or Data::encode() with XML format to ensure they properly validate and sanitize untrusted input. Implement input validation and output encoding best practices for XML generation.
قم بتحديث Kirby إلى الإصدار 4.9.0 أو 5.4.0 أو أحدث على الفور. راجع جميع الأكواد المخصصة والمكونات الإضافية التي تستخدم Xml::value() و Xml::tag() و Xml::create() أو Data::encode() مع تنسيق XML للتأكد من التحقق الصحيح من المدخلات غير الموثوقة. طبق أفضل الممارسات للتحقق من المدخلات وترميز المخرجات لإنشاء XML.