Skip to content

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

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

Show 5 moreShow fewer

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

Show 5 moreShow fewer

Year by year

3 years

What each year's disclosed reports show, newest first. A year with few reports says less.

Reports per yearPeak 2019: 33
Reports per year
20012
20121
20131
20141
20153
20168
201710
201815
201933
202022
202116
202232
202330
202422
202511
202624
  1. 2026

    24 reports

    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.
  2. 2025

    11 reports

    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.

    Reports from 20252

  3. 2024

    22 reports

    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.
    and 1 more

    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.
Every point, year by year

Where it is found

65

The features and places the reports found it in, most-reported first.

  1. Stanford CoreNLP.

    Seen in 4 reports
  2. iXML metadata parsing in uploaded WAV files.

    Seen in 3 reports
  3. DoD web servers.

    Seen in 3 reports
  4. WordPress media library on PHP 8.

    Seen in 3 reports
  5. Endpoints that build XML from user input.

    Seen in 2 reports
View all 65

Root causes

10

The mistakes in the code or configuration behind the reports.

  1. XML parsers were left with external entity resolution and DTD processing enabled.

    Seen in 10 reports
  2. Code relied on PHP 8 disabling external entities by default but still passed a flag that explicitly enables entity substitution.

    Seen in 2 reports
  3. Sitemap parsers resolved external entities by default.

    Seen in 1 report
  4. Upload endpoints trusted a client-supplied allow_file_type_list parameter for validation.

    Seen in 1 report
  5. ImageMagick allowed external entity expansion and XInclude processing in SVG input.

    Seen in 1 report
View all 10

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
More in Third-party products and platforms

XML request bodies and parameters

of 3 ticked
More in XML request bodies and parameters

Other

of 3 ticked
More in Other

Feeds, sitemaps and crawlers

of 3 ticked
More in Feeds, sitemaps and crawlers
View more things to try

Bypasses and variations

10

How reports got past filters, encoders and other defences.

  1. When HTTP out-of-band exfiltration fails, use FTP or other protocols instead.

    Seen in 2 reports
  2. Use error-based techniques when out-of-band channels are blocked.

    Seen in 2 reports
  3. Store XXE output and retrieve it later from a different page.

    Seen in 2 reports
  4. Use UNC-style paths in external entities to capture NTLM hashes.

    Seen in 2 reports
  5. After confirming XXE, pivot to the cloud metadata endpoint to obtain credentials.

    Seen in 2 reports
View all 10

Payouts

8 paid

Public 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.

SeverityReportsPaidMedianHighest
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

Typical fixes

10

How programs fixed it, as the reports describe.

  1. Disable external entity resolution and DTD processing in XML parsers.

    Seen in 10 reports
  2. Do not pass flags that explicitly enable entity substitution, even on PHP 8.

    Seen in 2 reports
  3. Disable external entity resolution in sitemap parsers.

    Seen in 1 report
  4. Do not trust client-supplied file type lists; validate file types server-side.

    Seen in 1 report
  5. Disable external entity expansion and XInclude processing in ImageMagick SVG handling.

    Seen in 1 report
View all 10

Tips for beginners

12

Advice for a first hunt, drawn from the reports.

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
View all 12

Guides and techniques

View all

The best explainers, cheat sheets and technique posts on XXE, from around the web.

Keep learning

Where this lesson fits, and what 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.