Injection
XML External Entity (XXE)
XXE attacks abuse XML external entity processing to read local files, conduct SSRF, or cause denial of service.
- 41 payloads
- 1 file
- README on GitHub
Payloads are read from main at 35c1f2b (committed 22 Nov 2026). Project version 1.0.2.
These payloads are for authorized testing only: systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.
Payload files
Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.
xxe-payloads.txt
41 payloads · 7.1 KBLoading payloads for XXE…
What it is#
XML External Entity (XXE) injection is a vulnerability that allows an attacker to interfere with an application's processing of XML data. It can allow reading of arbitrary server files, SSRF to internal services, and in some configurations, remote code execution. XXE exploits XML parsers that resolve external entity references defined in the DTD.
Attack vectors#
- XML file upload endpoints (SVG, DOCX, XLSX, ODF)
- SOAP web service endpoints
- XML-based REST APIs
- Document processing services (PDF, Word)
- Feed parsers (RSS, Atom)
Testing methodology#
- Submit a DTD with an external entity referencing /etc/passwd
- Test for blind XXE using out-of-band DNS/HTTP interactions
- Test file:// and http:// URIs as external entity targets
- Try SVG or DOCX file uploads as an XXE vector
Indicators of vulnerability#
- File contents (/etc/passwd) returned in response
- HTTP or DNS request received on attacker-controlled server
- XML parser error referencing external entity resolution
- SSRF response containing internal service data
Detection guidance#
Disable external entity processing in all XML parsers. Monitor for outbound HTTP/DNS requests from XML processing services. Alert on XML documents containing DOCTYPE declarations.
Mitigation and remediation#
- Disable external entity and DTD processing in all XML parsers
- Use less complex data formats like JSON where possible
- Patch XML processing libraries to current versions
- Implement network-level egress filtering for XML processing services
References#
Responsible Use
All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.
- Systems and applications you own
- Authorized penetration testing engagements
- Bug bounty programs with defined scope
- Educational lab environments (DVWA, WebGoat, HackTheBox)