Skip to content
XXE Write-up Intermediate

Kirby < 3.9.6 XML External Entity (XXE) vulnerability — CVE-2023-38490

The Kirby CMS toolkit's XML parsing function used the LIBXML_NOENT option, which enables external entity substitution, leading to an XXE vulnerability. An attacker could exploit this to read local files on the server if a custom development or extension used the vulnerable function with user-controlled XML input.

Bastian Allgeier Follow

Published on acceis.fr

Exploits CVE · Septembre 2023

Bastian Allgeier (@bastianallgeier), Lukas Bestle (@lukasbestle), on acceis.fr

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could read local files on the server, but only if the Kirby instance uses a custom development or extension that calls the vulnerable function with user-controlled XML input.

What the attacker needed

Kirby instance with custom code or extension; Custom code uses Xml::parse with user input; Attacker can supply XML to the vulnerable function

How it was found

  1. Deploy a basic Kirby instance with the StarterKit.
  2. Reproduce the example page that uses an RSS feed.
  3. Modify the RSS feed model to accept a user-controllable source.
  4. Take a real RSS feed, save the XML file, and incorporate an XXE payload (e.g., to read /etc/passwd).
  5. Serve the malicious RSS file via HTTP.
  6. Trigger the vulnerability by providing the malicious payload to the application via a URL parameter.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Kirby is a content management system written in PHP. Its XML parsing function was configured in a way that allowed XML documents to include references to external files, which the parser would then load. This means an attacker who can supply XML to that function could make the server read and return sensitive files, a type of attack called XXE (XML External Entity).

What is XXE?

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.

Similar reports

View all

Same bug class and techniques, clearest first.

XML external entities (XXE)

The lesson behind this report.

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.