This article is Day 13 of a 60-day bug bounty mastery course focused on XML External Entity (XXE) injection attacks. It teaches how to identify XXE vulnerabilities in web applications, exploit them to read server files, detect blind XXE using out-of-band callbacks, and escalate XXE to SSRF attacks against cloud metadata services. XXE vulnerabilities can range from $500 to $50,000 in bounty payouts depending on what data is accessible, making them high-value targets for bug bounty hunters.
- How XXE exploits XML parser trustXXE works by injecting a DOCTYPE declaration that defines an external entity pointing to a local file or URL. When the XML parser resolves the entity before processing the document, it reads the target (such as /etc/passwd) and embeds the contents into the document. The application may then reflect these contents back in its response, allowing an attacker to read arbitrary files with the web server process permissions.
- Finding XML attack surfaces in applicationsXXE attack surface extends far beyond obvious XML forms. The article identifies multiple vectors including file uploads (.docx, .xlsx, .svg, .pptx files which are ZIP+XML archives), JSON endpoints that accept XML via Content-Type switching, SOAP APIs, PDF generators using XML templates, and RSS/Atom feed parsers. Burp Suite can filter for these by searching Content-Type headers for application/xml, text/xml, application/soap+xml, and application/rss+xml.
- Blind XXE requires out-of-band exfiltrationIn blind XXE, the application parses the malicious XML but does not reflect entity contents in the response. Exploitation requires causing the server to make external connections to attacker-controlled servers via DNS or HTTP callbacks (using tools like Burp Collaborator or interactsh). Data exfiltration uses a two-stage external DTD method because inline parameter entities cannot reference each other in the same DOCTYPE per XML specification.
- XXE escalation to SSRF and cloud metadataChanging the file:// URI scheme to http:// converts XXE into server-side request forgery. This allows reading internal services and cloud metadata endpoints only accessible from within the server's network. High-value targets include AWS EC2 metadata service at 169.254.169.254 and IAM credential endpoints, GCP metadata.google.internal, and Azure IMDS endpoints. Accessing AWS IAM credentials via XXE-SSRF can pay $10,000-$50,000+ compared to $500-$2,000 for basic file read.
- OOB callbacks confirm parsing without data reflectionEven when an application returns no visible data from the XXE payload, an out-of-band callback to an attacker-controlled server proves the XML parser resolved the external entity. DNS callbacks are particularly reliable because DNS is rarely blocked on outbound connections. The presence of the OOB callback alone constitutes sufficient evidence of an XXE vulnerability in a bug bounty report, even before attempting data exfiltration.
- XXE reporting emphasizes CVSS and escalation pathA strong XXE bug bounty report includes the complete request/response chain showing the malicious DOCTYPE injection, evidence of file read or OOB callback confirmation, and explicit CVSS scoring. Basic XXE rates CVSS 7.5 (High), while XXE escalated to SSRF accessing cloud credentials rates 9.8 (Critical). Reports should include remediation steps specific to the parser language: disabling external-general-entities in Java, using libxml_disable_entity_loader in PHP, or defusedxml in Python.
- Remediation is parser-specific configurationInput sanitization and WAF blacklisting are insufficient because DOCTYPE syntax has too many variations to block reliably. The only reliable fix is disabling external entity processing directly in the XML parser configuration. The article provides language-specific examples: Java requires setFeature("http://xml.org/sax/features/external-general-entities", false), PHP requires libxml_disable_entity_loader(true), and Python should use defusedxml library instead of standard xml.etree.
- SSRF escalation multiplies bounty value dramaticallyThe article emphasizes that testing for SSRF escalation on any confirmed XXE takes only 30 seconds but can multiply payout by 10x. A real-world example provided shows an invoice PDF generator with XXE in XML parsing that, when escalated from file:// to http://169.254.169.254, returned AWS IAM credentials with S3 full access, raising the bounty from an estimated $2,000 to $28,000 critical severity.
Bottom line: XXE vulnerabilities remain high-value bug bounty targets ranging from $500 to $50,000+ depending on whether they enable file read or SSRF escalation to cloud metadata services. The critical exploitation technique—changing file:// to http:// to access AWS IAM credentials—takes seconds to test but can transform a medium-severity finding into a critical payout, making SSRF escalation testing mandatory on every XXE discovery.
🎯 BUG BOUNTY COURSE
FREE
Part of the 60-Day Bug Bounty Mastery Course — from zero to first bounty
/etc/passwd — or worse, a window into the cloud metadata service that hands you production AWS credentials. It pays anywhere from $500 to $50,000 depending on what the server gives back. XXE Injection Bug Bounty Day 13 is where XML becomes a weapon.🎯 What You’ll Master in Day 13
⏱️ 22 min read · 3 hands-on exercises
📊 Where are you with XXE coming into Day 13?
📋 What You’ll Master in Day 13 — XXE Bug Bounty Guide
On Day 12 we exploited unrestricted file upload to gain remote code execution. Today we move into a completely different attack class — XML injection. XXE vulnerabilities exist wherever an application processes XML input without disabling external entity resolution, which is the default behaviour in many legacy XML parsing libraries. This is Day 13 of the 60-Day Bug Bounty Mastery Course.
How XXE Works — XML Parser Trust
XML supports a feature called external entities — references defined in a DOCTYPE declaration that the parser resolves before processing the document. Originally designed for including shared content, this feature can be abused to point the entity at local files or internal URLs. When the parser resolves the entity, it reads the target and embeds its contents into the document — which the application may then reflect back in its response.
Finding XML Input Points with Burp Suite
XXE exists wherever an application parses XML. The attack surface is wider than most hunters expect — it includes not just obvious XML forms, but also file uploads, API endpoints, and content-type switching.
⏱️ Time: 10 minutes · Free PortSwigger account required
Lab: “Exploiting XXE using external entities to retrieve files” — PortSwigger Web Academy
Steps:
1. Click “Access the lab” — a live vulnerable app loads
2. Navigate to a product page and click “Check stock”
3. Intercept the request in Burp Suite — note the XML body
4. Inject the XXE payload before the first XML element:
<!DOCTYPE foo [<!ENTITY xxe SYSTEM “file:///etc/passwd”>]>
5. Reference &xxe; in the productId field
6. Forward the request — /etc/passwd contents appear in response
7. The lab marks itself solved automatically
📸 Screenshot the solved lab confirmation and save it in your notes.
Blind XXE — Out-of-Band Exfiltration
Most real-world XXE vulnerabilities are blind — the application parses the malicious XML but does not reflect the entity contents in its response. Detecting and exploiting blind XXE requires out-of-band (OOB) techniques: causing the server to make an external connection to an attacker-controlled server, confirming that parsing occurred and allowing data exfiltration via DNS or HTTP.
⏱️ Time: 4 minutes · No tools required
in the HTTP response. You know the parser is XML-based.
Answer these before building your payload:
1. Why can’t you use &xxe; referencing file:///etc/passwd here?
2. How does a DNS callback confirm the parser is resolving external entities?
3. Why does data exfiltration require a two-stage approach (external DTD)?
4. What server-side restriction would block OOB HTTP callbacks but not DNS?
5. If callbacks are blocked entirely, how else could you confirm XXE?
📸 Write your answers and save it in your notes.
XXE to SSRF — Cloud Metadata Escalation
Replacing the file:// URI with http:// turns XXE into a server-side request forgery attack. The server fetches the URL and returns the response — giving you read access to internal services and cloud metadata endpoints that are only accessible from within the server’s network.
⏱️ Time: 20 minutes · Burp Suite Community + free PortSwigger account
Lab: “Blind XXE with out-of-band interaction” — PortSwigger Web Academy
📸 Screenshot the Burp Collaborator callback and save it in your notes. Tag #bbday13
Writing the Bug Bounty Report
XXE is one of the most well-understood vulnerability classes — triagers know exactly what to look for. A good XXE report shows the complete request/response chain, the file read or OOB callback evidence, and a clear CVSS score with justification.
🧠 QUICK CHECK — Day 13
📋 Key Payloads Today — Day 13 Reference Card
🏆 Mark Day 13 as Complete
From basic file read to cloud metadata escalation — XXE mastered.
❓ Frequently Asked Questions – XXE Injection Bug Bounty
What is XXE injection?
What is the difference between regular and blind XXE?
How much does XXE pay on bug bounty programs?
How do I prevent XXE?
What comes after XXE in this course?
Day 12: File Upload Vulnerabilities
Day 14: Command Injection
📚 Further Reading
- Day 12: File Upload Vulnerabilities — The previous session — exploit unrestricted file upload to achieve remote code execution and understand the upload validation bypass techniques.
- Burp Suite Cheat Sheet 2026 — Complete Burp Suite reference including Repeater, Collaborator, and Intruder workflows essential for finding and exploiting XXE.
- Bug Bounty Course Hub — The full 60-day course map showing where XXE sits in the complete bug bounty methodology and what vulnerability classes follow.
- PortSwigger: XXE Complete Guide — The definitive XXE reference with 9 free interactive labs covering all XXE variants including blind OOB, error-based, and SVG-based XXE.
- OWASP XXE Prevention Cheat Sheet — Parser-specific disable instructions for Java, PHP, Python, .NET, and every major XML library — the remediation reference for your bug reports.

