xxe-xml-external-entity
XXE playbook. Use when XML, SVG, OOXML, SOAP, or parser-driven imports may resolve external entities, files, or internal network resources.
Security Assessment
Detected risks:
About xxe-xml-external-entity
An XML External Entity (XXE) testing playbook for use when XML, SVG, OOXML, SOAP, or parser-driven imports may resolve external entities, files, or internal network resources. It begins with the classic file-read payload, a DOCTYPE declaring a SYSTEM entity that points at a local file, and a checklist for confirming whether entity content reflects in the response.
Attack-surface discovery covers direct XML inputs such as SOAP endpoints, XML REST APIs, and RSS or Atom parsers, plus non-obvious cases like switching a JSON request's Content-Type to application/xml, and file uploads including SVG and Office Open XML documents (docx, xlsx, pptx), which are ZIP archives of XML. When entities are parsed but not echoed, the guide walks through out-of-band exfiltration using an attacker-hosted malicious DTD, error-based leaks, and DNS-only callbacks, which it emphasizes as critical for blind cases.
Further sections enumerate Linux and Windows file-read targets, SVG upload XXE, XInclude for when DOCTYPE is blocked, protocol handlers including file, http, the php filter wrapper for base64, ftp, and gopher, the XXE-to-SSRF chain including cloud metadata endpoints, defense bypasses, and local DTD injection for blind amplification. A companion SCENARIOS.md is referenced for real-world CVE chains such as Apache Solr XXE plus RCE and a step-by-step docx XXE. It is framed factually as a neutral security-testing reference.
FAQ
When should this playbook be used?
When XML, SVG, OOXML, SOAP, or parser-driven imports may resolve external entities, files, or internal network resources.
What happens when entity content is not reflected in the response?
It moves to out-of-band exfiltration using an attacker-hosted malicious DTD, error-based leaks, and DNS-only callbacks, which are emphasized as critical for blind cases.
Can it test file uploads?
Yes. It covers SVG uploads and Office Open XML files such as docx, xlsx, and pptx, which are ZIP archives of XML that can carry an injected DOCTYPE.
Does it cover chaining to other vulnerabilities?
Yes. It describes the XXE-to-SSRF chain, including pointing entities at internal or cloud metadata endpoints, and references CVE chains like Apache Solr XXE plus RCE.
What can be tried if DOCTYPE is blocked?
XInclude, which needs no DOCTYPE, can be used to include external files such as through an xi:include reference.
Install xxe-xml-external-entity
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
yaklang/hack-skills