In-depth lesson · bug class
XML external entities (XXE)
What every disclosed XXE report in the index teaches, put together: how it works, how it changed year by year, where it turns up, and things to try. Every point shows the reports it is seen in.
- reports cited in this lesson
- 90
- median public bounty
- $1,050
- highest public bounty
- $9,000
Learning XXE reading list
Overview
What it is and why programs pay for it.
XML external entity (XXE) is a flaw in how an application parses XML. When a parser is allowed to resolve external entities and process document type definitions, an attacker who controls any part of the XML can make the parser fetch local files, contact remote hosts, or expand entities until resources run out. The database behind this lesson holds 97 reports, 19 with summaries and 8 paid, so it is a real but not always rewarded class of bug. Programs care because the same parser mistake can expose configuration files, credentials and internal services, and because the fix is usually a single parser setting.
What it usually leads to is information disclosure: local files read back in a response or an error, outbound requests that prove the server can be steered, and in the worst cases cloud metadata credentials or NTLM hashes captured from a Windows host. Some reports show it escalating to remote code execution, for example on DoD web servers and on-premises Dynamics 365, but those are the exception rather than the rule. Denial of service through entity expansion is also documented.
It turns up wherever XML is parsed: SOAP services, SAML response parameters, sitemap and feed crawlers, XLSX and XLF uploads, image metadata in WAV, JPEG and SVG files, PDF generators, workflow schedulers, search ingest APIs, login endpoints and configuration loaders. The evidence also shows it in less obvious places such as spell-check endpoints, EPP dashboards, ColdFusion WDDX packets and AMF parsers that carry XML. If a feature accepts XML, or accepts a file that contains XML, it is a candidate.
Seen in these reports31
-
Critical -
Critical -
High
Show 5 moreShow fewer
-
$9,000 -
$7,500
-
$2,000
-
$1,500 Critical -
$600
How it works
The mechanics, as the reports show them.
The attack starts with a document type definition at the top of an XML document. That definition can declare an entity whose value is not a literal string but a reference to something outside the document, such as a local file path or a remote address. When the parser meets a reference to that entity in the body of the document, it resolves it, and the resolved content is substituted where the reference appeared.
What makes this possible is a parser configuration that leaves external entity resolution and DTD processing switched on. Many XML libraries default to safe behaviour, but code often overrides the default, for example by passing a flag that explicitly enables entity substitution even on PHP 8 where external entities are otherwise off. Configuration loaders, sitemap parsers, SAML handlers and image metadata parsers have all been found with these settings left open.
The impact depends on where the resolved content ends up. If the application echoes the parsed value back, the file contents appear directly in the response. If it does not, the entity can point at a host the attacker controls and the server makes an outbound request, which proves the flaw even when nothing is returned. Error messages are another channel: a failed resolution can leak file contents into an error page.
Once resolution is confirmed, the entity can be aimed at other targets. On cloud hosts the metadata service is the classic pivot, turning a file read into credentials. On Windows, a UNC-style path makes the server authenticate outwards, and the resulting NTLM hash can be captured. Where HTTP callbacks are blocked, other protocols or PHP stream wrappers have been used to get data out.
The same mechanism appears in file uploads because many file formats embed XML. A WAV file carries an iXML chunk, an XLSX contains worksheet XML, an XLF is translation XML, a JPEG can carry XMP metadata and an SVG is XML itself. If the upload pipeline parses any of these with an unsafe parser, the upload becomes the delivery mechanism. Stored output is a further variant: the resolved content is saved by one feature and rendered later by another, sometimes without access control.
A related failure is entity expansion without any external fetch. Nested entity definitions can blow up into a very large document and exhaust memory or CPU, which is a denial of service rather than a disclosure. The fix for both is the same family of parser settings: disable DTD processing and external entity resolution, and do not pass flags that re-enable them.
Seen in these reports28
-
$600 -
Critical -
Critical
Show 5 moreShow fewer
-
Medium -
Critical -
High -
High -
Critical
Year by year
3 yearsWhat each year's disclosed reports show, newest first. A year with few reports says less.
| 2001 | 2 |
|---|---|
| 2012 | 1 |
| 2013 | 1 |
| 2014 | 1 |
| 2015 | 3 |
| 2016 | 8 |
| 2017 | 10 |
| 2018 | 15 |
| 2019 | 33 |
| 2020 | 22 |
| 2021 | 16 |
| 2022 | 32 |
| 2023 | 30 |
| 2024 | 22 |
| 2025 | 11 |
| 2026 | 24 |
-
2026
New this year2
- Regex filtering in an AQL parser is bypassed to enable SSRF and blind file reads, a fresh bypass angle in the disclosed reports.
- PowerShell XML parsing components appear as a target for external entity handling in the disclosed reports.
Kept working2
- Microsoft product vulnerabilities recur, with on-premises Dynamics 365 XML parsing tested for external entities and remote code execution in the disclosed reports.
- Certificate request endpoints that accept XML bodies were probed by placing an external entity inside a ProfileID element and reading the error response for file contents in the disclosed reports.
Turned up less2
- Earlier file upload and import features such as XLSX, XLF and SVG are not the focus of the 2026 reports in the disclosed reports.
- Cloud metadata pivoting after confirming external entity resolution, common in 2020, does not feature in the 2026 reports in the disclosed reports.
-
2025
New this year1
- XSLT parsing inside text processing libraries is highlighted as a distinct external entity surface in the disclosed reports.
Kept working1
- Cloud search ingest APIs that accept XML were tested for external entity resolution and information disclosure in the disclosed reports.
Turned up less2
- Earlier file upload and import features such as XLSX, XLF and SVG are absent from the 2025 reports in the disclosed reports.
- Cloud metadata pivoting after confirming external entity resolution, seen in 2020, does not appear in the 2025 reports in the disclosed reports.
-
2024
Kept working3
- Certificate request endpoints that accept XML bodies were probed by placing an external entity inside a ProfileID element and reading the error response for file contents in the disclosed reports.
- DoD web servers were again tested for external entity resolution and possible remote code execution in the disclosed reports.
Turned up less2
- Earlier years often relied on file upload and import features such as XLSX, XLF and SVG, which are not the focus of the 2024 reports in the disclosed reports.
- Cloud metadata pivoting after confirming external entity resolution, common in 2020, does not feature in the 2024 reports in the disclosed reports.
Where it is found
65The features and places the reports found it in, most-reported first.
-
Stanford CoreNLP.
Seen in 4 reports
-
iXML metadata parsing in uploaded WAV files.
Seen in 3 reports
-
DoD web servers.
Seen in 3 reports
-
WordPress media library on PHP 8.
Seen in 3 reports
-
Endpoints that build XML from user input.
Seen in 2 reports
Technologies in these reports16
Root causes
10The mistakes in the code or configuration behind the reports.
-
XML parsers were left with external entity resolution and DTD processing enabled.
Seen in 10 reports
-
Code relied on PHP 8 disabling external entities by default but still passed a flag that explicitly enables entity substitution.
Seen in 2 reports
-
Medium -
$600
-
-
Sitemap parsers resolved external entities by default.
Seen in 1 report
-
Upload endpoints trusted a client-supplied allow_file_type_list parameter for validation.
Seen in 1 report
-
ImageMagick allowed external entity expansion and XInclude processing in SVG input.
Seen in 1 report
-
$1,500 Critical
-
Things to try
The most-reported tests in the largest contexts. Tick what you have tried; ticks stay in this browser and carry over to the full checklist. Test only what a program's scope allows.
ticked in this lesson
Third-party products and platforms
of 3 ticked-
Seen in 4 reports
XML request bodies and parameters
of 3 ticked-
Seen in 4 reports
-
Seen in 2 reports
-
Seen in 2 reports
Feeds, sitemaps and crawlers
of 3 ticked-
Seen in 1 report
-
Seen in 1 report
-
Seen in 1 report
Bypasses and variations
10How reports got past filters, encoders and other defences.
-
When HTTP out-of-band exfiltration fails, use FTP or other protocols instead.
Seen in 2 reports
-
Use error-based techniques when out-of-band channels are blocked.
-
Store XXE output and retrieve it later from a different page.
-
Use UNC-style paths in external entities to capture NTLM hashes.
Seen in 2 reports
-
After confirming XXE, pivot to the cloud metadata endpoint to obtain credentials.
Seen in 2 reports
Payouts
8 paidPublic bounties in US dollars, from the data. 8 of 299 reports show an amount.
- a quarter paid up to
- $500
- median
- $1,050
- three quarters paid up to
- $3,375
- highest
- $9,000
One in ten paid reports was paid $7,950 or more.
| Severity | Reports | Paid | Median | Highest |
|---|---|---|---|---|
| Critical | 20 | 1 | $1,500 | $1,500 |
| High | 83 | 0 | None paid | None |
| Medium | 65 | 1 | $500 | $500 |
| Low | 8 | 0 | None paid | None |
| Unrated | 123 | 6 | $1,300 | $9,000 |
Highest-paid reports5
-
$9,000 -
$7,500
-
$2,000
-
$1,500 Critical -
$600
Typical fixes
10How programs fixed it, as the reports describe.
-
Disable external entity resolution and DTD processing in XML parsers.
Seen in 10 reports
-
Do not pass flags that explicitly enable entity substitution, even on PHP 8.
Seen in 2 reports
-
Medium -
$600
-
-
Disable external entity resolution in sitemap parsers.
Seen in 1 report
-
Do not trust client-supplied file type lists; validate file types server-side.
Seen in 1 report
-
Disable external entity expansion and XInclude processing in ImageMagick SVG handling.
Seen in 1 report
-
$1,500 Critical
-
Tips for beginners
12Advice for a first hunt, drawn from the reports.
-
Start with features that obviously parse XML: SOAP endpoints, SAML response parameters, sitemap and RSS crawlers, search ingest APIs and login endpoints that accept XML bodies. Then widen to uploads that contain XML, such as XLSX, XLF, WAV, JPEG and SVG, because the parser is often hidden behind the file type.
Seen in 15 reports
-
Report the parser setting and the fix, not just the payload. The strongest reports explain that external entity resolution and DTD processing were enabled, show the evidence of resolution, and note the standard remediation of disabling both. This helps triage and shows you understand the root cause.
Seen in 8 reports
-
Use a host you control to watch for callbacks, and have a fallback ready. If HTTP callbacks are blocked, try other protocols, error-based techniques or PHP stream wrappers where the stack allows it. The evidence shows all of these being used when the simple channel failed.
Seen in 5 reports
-
Prove impact with the smallest possible read. A single local file that is clearly sensitive, such as a configuration file, is enough to demonstrate the flaw. Do not go hunting through the filesystem for trophies; that increases risk and adds nothing to the report.
Seen in 5 reports
-
On cloud-hosted targets, a confirmed file read can often be extended to the metadata service to show credential exposure. Treat this as a separate, higher-impact step and only take it if the programme permits it. The same caution applies to UNC paths that capture NTLM hashes on Windows hosts.
Seen in 4 reports
Guides and techniques
View allThe best explainers, cheat sheets and technique posts on XXE, from around the web.
-
XXE: A complete guide to exploiting advanced XXE vulnerabilitiesDetails XXE from basic entity injection through external DTDs, blind parameter entities, encoding tricks and escalation to RCE.
Explainer intigriti.com
-
XML external entity: The ultimate Bug Bounty guide to exploiting XXE vulnerabilitiesExplains XXE types and practical exploitation for file disclosure, internal reconnaissance and denial of service.
Explainer yeswehack.com
-
XML Security in JavaTests ten Java XML parsers against sixteen security features and payloads, showing how to secure them against XXE.
Technique semgrep.dev
-
Exploiting XXE with local DTD filesShows how to exploit blind XXE by bruteforcing local DTD files and redefining parameter entities to force error output.
Technique mohemiv.com
-
XML Schema, DTD, and Entity AttacksExplains XML schema, DTD and entity attacks including XXE and how to exploit them.
Explainer vsecurity.com
Keep learning
Where this lesson fits, and what to read next.
Learning paths
Lessons to read next
How this is made: our model read every listed XXE report in the index (our own summary where we have one, otherwise the title and the platform's label), listed the patterns, and merged them. Each point was kept only if the reports it cites exist, are listed and belong here; payouts are computed from the data, not written by the model. Read the originals before relying on a point. Generated 27 Nov 2026 from 97 reports. All XXE reports.