Skip to content
XXE Write-up Intermediate

Exploiting Irctc Along With Few Other Government Domains Through Xxe

The author found that several Indian government websites, including IRCTC, had XML parsers that were misconfigured to allow external entities. By sending a crafted XML request, an attacker could read local files on the server, such as the password file.

Swapmaurya Follow

Published on systemweakness.com

In this blog, I would be giving an Insight about XXE(XML External Entity) injection and a practical attack case study where I did Responsible Disclosures to Indian Government through NCIIPC back in 2021.

Swapmaurya, on systemweakness.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 allow external entities and did not disable them, so user-supplied XML could reference local files.

Impact

An attacker could read local system files, which could expose sensitive information; the author states the issue was fixed.

What the attacker needed

Target accepts XML input; XML parser allows external entities

The fix

The XML parser should be configured to disable external entities and DTDs, and the text says the issues were fixed by the NCIIPC team.

How it was found

  1. Find government domains that accept XML input using search engines and dorks.
  2. Send an XML request that defines an external entity pointing to a local file.
  3. Adjust the file path with directory traversal until the file content is returned.

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 is a format for structuring data, and some websites accept XML input. An XML parser is the software that reads that XML. If the parser is not configured securely, it can be tricked into including content from the server's own files, which is called an XXE attack. This 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.