Bug class · Intermediate
XML external entities (XXE)
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.
- median public bounty
- $1,050
- highest public bounty
- $9,000
How it works
Full lessonThe pattern behind every report in this class.
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.
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.
Things to try
All 81Each line worked in a disclosed report. Test only what a program's scope allows.
Third-party products and platforms 30
- Test Stanford CoreNLP XML parsing for external entity references.
- Feed XML into LangChain's XMLOutputParser and text splitters and test for entity expansion and XXE.
- Send a WDDX packet to a ColdFusion endpoint and test whether the embedded XML resolves external entities.
- Send AMF-encoded data that carries XML and check whether the parser resolves external entities.
XML request bodies and parameters 10
- Send an XML body that declares an external entity pointing at a local file and reference it in a field, then check whether the file contents come back in the response or an error.
- Send XML with injected elements or attributes to endpoints that build XML from user input and check for injection.
- Feed XML into a component that performs XSLT parsing and check whether external entities are resolved.
- Send XML to a messaging servlet that parses it and check for file reads and outbound requests.
Other 8
- Send XXE payloads to an EPP endpoint and then check other dashboard pages for the stored file contents appearing later.
- Store XXE output in one feature and look for it rendered later on a different page or export.
- Test multiple domains belonging to the same organisation for blind out-of-band XXE.
- Test XML parsing on production infrastructure for read access.
Feeds, sitemaps and crawlers 7
- Point a site audit or crawler at a sitemap.xml you host that declares an external entity, then check for callbacks or file contents.
- Capture a search request, change it to POST with an XML content type, add a DTD reference and check your server logs for the callback.
- Submit an RSS or XML feed that declares an external entity and see whether the feed reader resolves it.
- Point an enterprise search web crawler at a page or sitemap you host that declares external entities.
SVG and image processing 6
- Upload an SVG that references an external DTD and reads a local file, then render it through the image conversion pipeline.
- Craft a WAV file whose iXML chunk contains XML with an external entity and upload it to a media library as an author-level user.
- Embed an XMP metadata block in an uploaded JPEG that references an external DTD and watch for a callback from the image processor.
- Use an insert SVG feature in a desktop or web application to trigger blind XXE through the SVG parser.
Bypasses and variations
All 10- When HTTP out-of-band exfiltration fails, use FTP or other protocols instead.
- 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.
- After confirming XXE, pivot to the cloud metadata endpoint to obtain credentials.
- Use a double forward slash in an SVG fill attribute to get past a regex filter and load an external SVG.
Typical fixes
All 11- Disable external entity resolution and DTD processing in XML parsers.
- Do not pass flags that explicitly enable entity substitution, even on PHP 8.
- Disable external entity resolution in sitemap parsers.
- Disable entity expansion in XML configuration loaders.
- Do not trust client-supplied file type lists; validate file types server-side.
- Disable external entity expansion and XInclude processing in ImageMagick SVG handling.
Tips for beginners
All 13- 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.
- Before sending anything, confirm the feature is in scope and that you are allowed to make outbound requests from the target. A blind XXE test causes the server to contact a host you control, which some programmes treat as prohibited or rate-limited. Read the policy first; reporting an out-of-scope callback is a common beginner mistake.
- 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.
- 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.
- If the response does not show the resolved content, look for a second place it might appear. Stored XXE output has been found rendered on a different page or export, sometimes without access control. Check dashboards, previews and exports after submitting.
- 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.
Start here: a reading path
Open the pathClear reports in order, easiest first.
-
1
How Secure is Java’s SecureProcessing?Beginner
Likely the SecureProcessing feature only limits some resource usage (like entity expansion) but does not disable external entity resolution, which is the core of XXE.
-
2
The Regex Said Safe. The Parser Disagreed. NASA’s Earth Science Platform Had a Critical Vulnerability.Intermediate
The sanitizer used a regex where the dot did not match newlines, so multi-line DOCTYPE declarations bypassed removal, and the XML parser was not configured to disable external entity resolution.
-
3
Jenkins Swarm Plugin XML external entities information disclosure vulnerabilityIntermediate
The XML parser used in getCandidateFromDatagramResponses() does not disable external entity resolution, allowing XXE.
-
4
ManageEngine OpManager Add UCS Device blind XXE vulnerabilityIntermediate
The XML parser (DocumentBuilder) is used with default settings that allow external entities, and the XML comes from an attacker-controllable source.
-
5
XXE in Site Audit function exposing file and directory contentsIntermediate
Likely the XML parser was not configured to disable external entity processing, allowing DTDs to define entities that read local files.
-
6
Unauthenticated XXE leading to SSRF and internal resource accessIntermediate
The XML parser was configured to resolve external entities and DTDs, and error messages exposed the results of those resolutions.
-
7
The File That Answered Back — XXE Hidden in Cell A2Intermediate
Likely the .NET XML parser used to process the uploaded XLSX had external entity resolution enabled by default, and the developer did not disable it.
-
8
GHSL-2023-056: XML external entity (XXE) in Jenkins External Monitor Job Plugin - CVE-2023-37942Intermediate
The XML parser was created without disabling DTDs or external entity resolution.
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
Highest paid
View allThe biggest public bounties for XXE.
-
0day writeup: XXE in uber.comUber Write-up
$9,000 -
$7,500 -
XXE To AWS Metadata DisclosureWrite-up
$2,000 -
LFI and SSRF via XXE in emblem editorCritical Rockstar Games HackerOne
$1,500 -
WordPress 5.7 XXE VulnerabilityWordPress Write-up
$600 -
XXE at Bol.comBol.com Write-up
$500 -
Blind XXE on pu.vk.comMedium VK.com HackerOne
$500 -
Blind OOB XXE At "http://ubermovement.com/"Uber HackerOne
$500
Newest reports
All 299Most recently disclosed.
-
(0Day) Open Robotics ROS 2 sros2 load_policy XML External Entity Processing Information Disclosure VulnerabilityMedium Zero Day Initiative Advisory
-
-
Microsoft PowerShell Information Disclosure Vulnerability (CVE-2026-122985)High Microsoft Advisory
-
Microsoft Dynamics 365 (on-premises) Information Disclosure Vulnerability (CVE-2026-122196)High Microsoft Advisory
-
PowerShell Information Disclosure Vulnerability (CVE-2026-121675)High Microsoft Advisory
-
Quest Foglight for Databases getSource XML External Entity Processing Information Disclosure VulnerabilityHigh Zero Day Initiative Advisory
-
Quest Foglight for Databases AbstractParser XML External Entity Processing Information Disclosure VulnerabilityHigh Zero Day Initiative Advisory
-
MailEnable parseObjectResponse XML External Entity Processing Information Disclosure VulnerabilityMedium Zero Day Initiative Advisory
-
-
(0Day) Sparx Systems Enterprise Architect XSLT Debugger XML External Entity Processing Information Disclosure VulnerabilityMedium Zero Day Initiative Advisory
New XXE reports by email
Follow XXE and get each week's new disclosures in one short email.