mukul975/anthropic-cybersecurity-skills/testing-for-xxe-injection-vulnerabilities
Claude Code and agent skill by mukul975/anthropic-cybersecurity-skills
- community
Checking that the SKILL.md file is still in the repository.
Discovering and exploiting XML External Entity injection vulnerabilities
Install
npx vskill@latest install mukul975/anthropic-cybersecurity-skills/testing-for-xxe-injection-vulnerabilitiesSKILL.md
The same SKILL.md was published earlier as mukul975/anthropic-cybersecurity-skills/testing-for-xxe-injection-vulnerabilities.
Testing for XXE Injection Vulnerabilities
When to Use
- During authorized penetration tests when the application processes XML input (SOAP APIs, file uploads, RSS feeds)
- When testing APIs that accept
Content-Type: application/xmlortext/xml - For assessing XML parsers in file upload functionality (DOCX, XLSX, SVG, PDF)
- When evaluating SOAP-based web services for entity injection
- During security assessments of enterprise applications using XML configuration
Prerequisites
- Authorization: Written penetration testing agreement for the target
- Burp Suite Professional: For intercepting and modifying XML requests
- XXEinjector: Automated XXE exploitation tool (
git clone https://github.com/enjoiz/XXEinjector.git) - Out-of-band server: Burp Collaborator or interactsh for blind XXE detection
- curl: For manual payload crafting and submission
- Python: For building DTD hosting server
Workflow
Step 1: Identify XML Processing Points
Find all application endpoints that accept or process XML data.
Step 2: Test for Basic XXE with File Retrieval
Inject XML entities to read local files from the server.
Step 3: Test Blind XXE with Out-of-Band Detection
When the entity value is not reflected in the response, use out-of-band techniques.
Step 4: Exfiltrate Data via Out-of-Band XXE
Use external DTD to extract file contents through HTTP requests.
Step 5: Test XXE via File Uploads
Test XML parsing in document upload functionality.
Step 6: Test XXE for Server-Side Request Forgery (SSRF)
Use XXE to make the server send requests to internal services.
Key Concepts
| Concept | Description | |
|---|---|---|
| XML External Entity | An entity defined in a DTD that references external resources via SYSTEM or PUBLIC keywords | |
| DTD (Document Type Definition) | Defines the structure and legal elements of an XML document, including entity declarations | |
| Internal Entity | Entity defined with a value directly in the DTD (<!ENTITY name "value">) | |
| External Entity | Entity that loads content from a URI (<!ENTITY name SYSTEM "uri">) | |
| Parameter Entity | Entity used within the DTD itself, prefixed with % (<!ENTITY % name SYSTEM "uri">) | |
| Blind XXE | XXE where entity values are not reflected in the response, requiring out-of-band exfiltration | |
| Billion Laughs (DoS) | Recursive entity expansion attack causing exponential memory consumption | |
| XXE to SSRF | Using XXE to make the server send HTTP requests to internal or external services |
Tools & Systems
| Tool | Purpose | |
|---|---|---|
| Burp Suite Professional | Request interception, modification, and Collaborator for OOB detection | |
| XXEinjector | Automated XXE exploitation with file exfiltration and SSRF capabilities | |
| interactsh | Out-of-band interaction server for detecting blind XXE callbacks | |
| xxeserv | Dedicated FTP/HTTP server for XXE data exfiltration | |
| OWASP ZAP | Automated XXE scanning in active scan mode | |
| DTD-Finder | Discovers DTD files on the server for entity injection |
Common Scenarios
Scenario 1: SOAP API File Read
A SOAP web service processes XML input without disabling external entities. Injecting a DTD with a SYSTEM entity in the SOAP body reads /etc/passwd and returns it in the SOAP response.
Scenario 2: SVG Upload Blind XXE
An image upload feature accepts SVG files. The SVG is parsed server-side for thumbnail generation. Using a blind XXE payload in the SVG, server files are exfiltrated via out-of-band HTTP requests.
Scenario 3: JSON to XML Content-Type Switch
A REST API primarily uses JSON but the XML parser is also enabled. Switching Content-Type to application/xml and sending an XXE payload exposes server files through the API response.
Scenario 4: DOCX Processing XXE
A resume upload feature processes DOCX files. Injecting XXE into the [Content_Types].xml file within the DOCX archive triggers file read when the document is parsed server-side.
Output Format
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/testing-for-xxe-injection-vulnerabilities/SKILL.md
Popularity
- Repository stars
- 6,099
- Repository forks
- 838
- 7-day trend score
- 44
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 8 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mukul975/anthropic-cybersecurity-skills/testing-for-xxe-injection-vulnerabilities)