Skip to content
XXE Write-up Intermediate

GetSimple CMS <= 3.3.4 (api.php) XML External Entity Vulnerability

The admin API script passes the 'data' POST parameter directly to PHP's simplexml_load_string() without sanitising it. An attacker could exploit this to perform XML External Entity attacks and disclose arbitrary files.

karmainsecurity.com

Published on karmainsecurity.com

User input passed via the “data” POST parameter is not properly sanitized before being used in a call to the simplexmlloadstring() PHP function at line 23. This can be exploited to carry out XML External Entity (XXE) attacks, resulting in arbitrary file disclosures.

The author, on karmainsecurity.com

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

Root cause

The application calls simplexml_load_string() on untrusted POST input without disabling external entity loading.

Impact

An attacker could read arbitrary files on the server, potentially exposing credentials or configuration data.

What the attacker needed

Access to the admin API endpoint

The fix

The code should parse untrusted XML with external entity loading disabled, for example by not passing the LIBXML_NOENT flag and rejecting DOCTYPE declarations.

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.

XML allows a document to define 'entities', which are like shortcuts that can point to other files on the server. If the parser is not told to ignore these external references, an attacker can make the server read and return files it should not. Here the CMS feeds user-supplied XML straight into the parser, so a crafted request can leak local files.

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.