This article is Day 13 of a 60-day bug bounty mastery course focused on XXE (XML External Entity) injection attacks. It covers how XXE vulnerabilities work, techniques to identify XML input points, methods to exploit both basic and blind XXE, escalation to SSRF for cloud metadata access, and how to write a professional bug bounty report. The article emphasizes that XXE can yield payouts from $500 to $50,000+ depending on what data is exposed, making it a high-impact vulnerability class for security researchers.
- How XXE Exploits Parser TrustXXE attacks inject a DOCTYPE declaration that defines external entities pointing to local files or internal URLs. When the XML parser resolves these entities before processing the document, it reads the target resource and embeds its contents into the document, which the application may reflect in its response. For example, a stock check endpoint can be weaponized by injecting and referencing &xxe; in the XML payload, causing the parser to return /etc/passwd contents in the error message.
- Identifying Unexpectedly Wide XML Attack SurfaceXXE input points extend far beyond obvious XML forms. The article identifies several overlooked attack surfaces: file uploads including .docx, .xlsx, .svg, and .pptx (which are ZIP+XML formats), JSON endpoints that may accept XML with Content-Type switching, SOAP APIs, PDF generators using XML templates, and RSS/Atom feed parsers. Burp Suite can filter for XML content types (application/xml, text/xml, application/soap+xml, application/rss+xml) to systematically identify vulnerable endpoints.
- Blind XXE Requires Out-of-Band ExfiltrationWhen an application parses XML but does not reflect entity contents in its response, blind XXE techniques are required. The article explains that attackers use out-of-band (OOB) callbacks via services like Burp Collaborator or interactsh to confirm the server resolved the external entity. DNS or HTTP callbacks prove parsing occurred. For data exfiltration, a two-stage approach using an external DTD file is necessary because inline parameter entities cannot reference each other within the same DOCTYPE declaration per XML specifications.
- XXE to SSRF Escalation Multiplies PayoutsReplacing file:// URIs with http:// transforms XXE into SSRF, allowing the server to fetch internal URLs and cloud metadata endpoints. The article highlights critical targets: AWS EC2 metadata service at 169.254.169.254 providing instance metadata and IAM credentials, GCP metadata service, and Azure IMDS. XXE reading /etc/passwd typically pays $500-$2,000, but the same payload modified to access AWS IAM credentials via the metadata service can pay $10,000-$50,000+. The article emphasizes testing for SSRF escalation takes 30 seconds and can multiply bounty payouts by 10x.
- Practical XXE Exploitation on Live LabsThe article provides three hands-on exercises using authorized platforms (PortSwigger Web Academy, HackTheBox, TryHackMe). Exercise 1 involves exploiting basic XXE on a stock check endpoint to read /etc/passwd by injecting DOCTYPE before the XML element and referencing the entity in the productId field. Exercise 2 requires reasoning through why blind XXE needs OOB techniques. Exercise 3 uses Burp Collaborator to confirm blind XXE via HTTP callback on a PortSwigger lab, demonstrating that even without visible data return, an OOB callback proves entity resolution.
- Bug Bounty Report Structure and CVSSThe article provides a template for XXE reports that includes: title identifying the endpoint and attack type, severity scored as High (CVSS 7.5) for basic file read or Critical (9.8) for SSRF to metadata services, the affected endpoint, complete request/response reproduction steps, impact statement explaining unauthorized file access or credential disclosure, and remediation guidance with parser-specific code (Java: setFeature for external-general-entities, PHP: libxml_disable_entity_loader, Python: defusedxml library).
- XXE Prevention Requires Disabling Entity ProcessingThe article states that input sanitization and WAF rules are insufficient because DOCTYPE syntax has too many variations to blacklist. The only reliable fix is disabling external entity processing at the parser configuration level. Language-specific examples include Java factory.setFeature("http://xml.org/sax/features/external-general-entities", false), PHP libxml_disable_entity_loader(true), and Python use of defusedxml instead of standard library xml.etree.
- Authorized Testing Requirement for Ethical PracticeThe article explicitly states that all XXE techniques must be practiced on authorized platforms only (PortSwigger Web Academy, HackTheBox, TryHackMe, or bug bounty targets within published scope), never against applications outside active authorized engagement. This establishes the ethical framework for the entire course material and distinguishes defensive security education from unauthorized attacks.
Bottom line: XXE vulnerabilities remain highly lucrative in bug bounties because they exploit default XML parser configurations to read arbitrary files or access cloud metadata services; hunters should systematically identify XML input points across file uploads and content-type switching, master both basic and blind OOB exploitation techniques, and always test SSRF escalation to cloud metadata endpoints since the same payload modification from file:// to http:// can increase bounty payouts from thousands to
🎯 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 share in #day13-xxe on Discord.
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 share in #day13-blindxxe on Discord.
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 share in #day13-blindxxe on Discord. 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.

