Skip to content
XXE Write-up Intermediate

How I Found an Unauthenticated XXE That Allowed Arbitrary File Read in NASA

An unauthenticated endpoint in NASA's Common Metadata Repository accepted and parsed XML before checking the authentication token, and it allowed external entities. By triggering a parsing error, an attacker could make the server return the contents of arbitrary files such as the password file.

thomscoder Follow

Published on medium.com

NASA’s VDP is one of the most targeted programs by hackers worldwide, so finding something that isn’t a duplicate or marked as Not Applicable requires creative recon and a different approach than most other researchers.

thomasito, 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

The endpoint parsed attacker-supplied XML, including external entity definitions, before it validated the authentication token.

Impact

An unauthenticated attacker could read arbitrary files on the server, which was rated critical; the author notes that protocols other than file were also enabled.

What the attacker needed

No account needed; network access to the endpoint

How it was found

  1. Find the ingest validation endpoint while reviewing the public repository and its documentation.
  2. Send XML to the endpoint without an authentication token and observe that it is parsed anyway.
  3. Confirm out-of-band interaction to show external entities are processed.
  4. Craft a valid request and then break it deliberately to trigger a parsing error.
  5. Read the file contents echoed back in the error 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.

XML lets a document refer to outside resources, and a parser that follows those references can be tricked into reading files on the server. Here the server read the file and then leaked its contents inside an error message, so no login was needed.

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.