Skip to content
XXE Write-up Beginner

local file inclusion via xml

The API accepted XML as well as JSON, and its XML parser resolved external entities, so a crafted request could read local files from the server. The author used this to read the system password file, which contained the challenge flag.

medium.com

Published on medium.com

Writeup for the Data Vault Web challenge from the Snyk ctf 2026 hosted by Nahamsec. It will teach you about how to abuse XML for local file inclusion.

Julio, on medium.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

Likely the XML parser was configured to resolve external entities and the endpoint accepted XML without disabling that feature.

Impact

An attacker could read arbitrary files on the server, including the file that held the flag.

What the attacker needed

None

How it was found

  1. Send a normal JSON profile request and intercept it.
  2. Change the Content-Type header to application/xml.
  3. Send a simple XML body and confirm the server parses it.
  4. Send an XML body that defines an external entity pointing at a local file.
  5. Read the file contents returned in the response.

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.

The website said it only took JSON data, but it also quietly accepted XML. XML has a feature where a document can point to another file on the server, and if the parser is not told to refuse that, the file's contents get sent back in the reply. That is called XXE, and it lets an attacker read files they should not see.

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.