CVE-2023-38490
Published: 27 July 2023
Summary
CVE-2023-38490 is a medium-severity Improper Restriction of XML External Entity Reference (CWE-611) vulnerability in Getkirby Kirby. Its CVSS base score is 6.8 (Medium).
Operationally, ranked in the top 4.3% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
Deeper analysis
Kirby is a content management system affected by an XML External Entity (XXE) vulnerability in versions prior to 3.5.8.3, 3.6.6.3, 3.7.5.2, 3.8.4.1, and 3.9.6. The flaw exists only in sites or plugins that invoke the Xml data handler via Data::decode with the xml type or the Xml::parse method; the Kirby core itself does not call these routines. The root cause is the use of PHP's LIBXML_NOENT flag during parsing, which enables resolution of external entities and thereby exposes the application to CWE-611 and CWE-776 weaknesses.
An unauthenticated attacker who can supply a crafted XML document—through file upload, an external URL fetch, or any other path that reaches the vulnerable parsing code—can read arbitrary files on the server or induce server-side request forgery. Exploitation requires that the target site or plugin actually uses the affected XML methods on untrusted input; sites that never call these functions are unaffected. The CVSS 3.1 score of 6.8 reflects the network attack vector combined with high attack complexity and the confidentiality impact of file disclosure.
The maintainers addressed the issue by removing the LIBXML_NOENT constant from Xml::parse in the listed patch releases, eliminating external-entity processing for all callers. The changes are documented in the corresponding GitHub commits and release tags for each branch. The EPSS score remains flat at 0.2037 with no material increase after disclosure.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2023-2124
Vulnerability details
Kirby is a content management system. A vulnerability in versions prior to 3.5.8.3, 3.6.6.3, 3.7.5.2, 3.8.4.1, and 3.9.6 only affects Kirby sites that use the `Xml` data handler (e.g. `Data::decode($string, 'xml')`) or the `Xml::parse()` method in site or plugin code.…
more
The Kirby core does not use any of the affected methods. XML External Entities (XXE) is a little used feature in the XML markup language that allows to include data from external files in an XML structure. If the name of the external file can be controlled by an attacker, this becomes a vulnerability that can be abused for various system impacts like the disclosure of internal or confidential data that is stored on the server (arbitrary file disclosure) or to perform network requests on behalf of the server (server-side request forgery, SSRF). Kirby's `Xml::parse()` method used PHP's `LIBXML_NOENT` constant, which enabled the processing of XML external entities during the parsing operation. The `Xml::parse()` method is used in the `Xml` data handler (e.g. `Data::decode($string, 'xml')`). Both the vulnerable method and the data handler are not used in the Kirby core. However they may be used in site or plugin code, e.g. to parse RSS feeds or other XML files. If those files are of an external origin (e.g. uploaded by a user or retrieved from an external URL), attackers may be able to include an external entity in the XML file that will then be processed in the parsing process. Kirby sites that don't use XML parsing in site or plugin code are *not* affected. The problem has been patched in Kirby 3.5.8.3, 3.6.6.3, 3.7.5.2, 3.8.4.1, and 3.9.6. In all of the mentioned releases, the maintainers have removed the `LIBXML_NOENT` constant as processing of external entities is out of scope of the parsing logic. This protects all uses of the method against the described vulnerability.
- CWE(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.