Skip to content
XXE Write-up Intermediate

A Tale of Two Formats: Exploiting Insecure XML and ZIP File Parsers to Create a Web Shell

The app processed a ZIP containing an XML manifest; naive XML and ZIP parsing could enable file disclosure and path traversal, potentially leading to a web shell.

Eugene Lim Follow

Published on spaceraccoon.dev

While researching a bug bounty target, I came across a web application that processed a custom file type. Let’s call it .xyz.

Eugene Lim (@spaceraccoonsec), on spaceraccoon.dev

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 had external entity processing enabled by default, and the ZIP extraction library did not sanitise file paths, allowing directory traversal.

Impact

Naive handling of the ZIP and XML formats could create additional security issues, though the text does not detail specific impact.

What the attacker needed

Ability to upload a package file

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 app lets you upload a ZIP containing an XML file. If the XML and ZIP parsers use default settings, they may handle external entities and file paths unsafely.

What is XXE?

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

More by Eugene Lim

View all

10 more disclosed reports, best first.

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.