exploiting-xxe

exploiting-xxe is a skill for Claude Code from trilwu/secskills. It costs 0 tokens per session (3,605 once invoked), scanned C, original, MIT.

A security-testing guide for XML External Entity (XXE) injection, a flaw where an XML parser fetches files or URLs named inside untrusted XML. This can expose local files or provide access to internal services.

In plain words
What is it for?
Use it to test XML APIs, SOAP, RSS feeds, SAML, SVG uploads, and Office files that contain XML, including cases where results are not shown directly.
Why use it?
It helps identify XML processing that could be abused to read server data or make the server contact private network targets.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is mkdir doc && cd doc && unzip ../clean.docx.

Part of the secskills-offense plugin — 40 skills shipped together

Good fit Use it to test XML APIs, SOAP, RSS feeds, SAML, SVG uploads, and Office files that contain XML, including cases where results are not shown directly.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/trilwu/secskills
agentmods
npx agentmods add skills/trilwu/secskills/exploiting-xxe

Made for: Claude Code.

Or install secskills-offense, the plugin that ships this one along with the rest of its 40 skills.

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 exploiting-xxe

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/exploiting-xxe/github.svg)](https://agentmods.dev/skills/trilwu/secskills/exploiting-xxe)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/exploiting-xxe"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/exploiting-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 exploiting-xxe

Your own site · 80×15
<a href="https://agentmods.dev/skills/trilwu/secskills/exploiting-xxe"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/exploiting-xxe.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,605 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. 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.00000 $0.03605
Opus 5 $0.00000 $0.01802
Sonnet 5 $0.00000 $0.00721
Haiku 4.5 $0.00000 $0.00361

Measured 5d ago against content hash adad117983e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

exploiting-xxe scanned grade C with 2 findings 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 5d 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.

Reaches for credential filesmediumPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

file:///home/<user>/.ssh/id_rsa

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

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

<!ENTITY xxe SYSTEM "http://169.254.169.254/latest/meta-data/iam/security-credentials/">

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

secskills-offense/skills/exploiting-xxe/SKILL.md · 345 lines

How it starts

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

Exploiting XXE

XXE is what happens when an XML parser is allowed to resolve external entities the document defines. The attacker writes a DTD that tells the parser to fetch a file or a URL, and the parser obliges with the server's privileges. The reach is local file read and SSRF into the internal network. The hard cases are blind — the parser resolves the entity but never reflects it, so you exfiltrate out of band or through error messages.

Only against systems you are authorized to test.

When to Use

  • A request body is XML: Content-Type: application/xml, text/xml, or a SOAP envelope, and the body starts with <?xml
  • A file upload parses a format that is XML underneath: SVG, or an Office OOXML file (DOCX, XLSX, PPTX) which is a ZIP of XML parts, or an XML-bearing PDF
  • An endpoint consumes RSS/Atom feeds, XML-RPC, or SAML assertions
  • A parameter or field is later embedded into a server-side XML document
  • Source review shows an XML parser built without external entities disabled
  • You have a suspected sink but no reflected output — test for blind XXE

When NOT to Use

  • The wider web methodology — use testing-web-applications to find the sink before you land here
  • The primitive is a plain URL fetch, not XML — use exploiting-ssrf
  • Object deserialization — a different sink; use exploiting-deserialization
  • XXE inside a SAML flow specifically — start with attacking-saml for the signature, replay, and assertion context, then return here for the parser
  • Finding the parser configuration in source — use auditing-code-for-vulnerabilities

Recognizing XML Sinks

XML hides in more places than a Content-Type header:

  • Raw XML bodies — REST endpoints that accept application/xml
  • SOAP — the envelope is XML; the <?xml prolog and DTD go before <soap:Envelope>
  • SVG uploads — avatars, image processors, thumbnailers, chart renderers
  • Office OOXML — DOCX/XLSX/PPTX are ZIP archives of XML parts; the parser reads word/document.xml, xl/workbook.xml, etc.
  • PDF — some generators and XMP metadata paths parse embedded XML
  • RSS/Atom — feed importers parse attacker-controlled feed URLs
  • SAML — the <samlp:Response> and <saml:Assertion> are XML
  • XML-RPC — the method call envelope is XML
  • Config/import features — "import from XML", sitemap uploads, plist parsing

Read the full file on GitHub · 345 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. 5d ago First seen · 345 lines · 0 tokens per session scan C adad117983e3

Subscribe to this mod's changes

exploiting-xxe is a skill published in the GitHub repository trilwu/secskills (137 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,605 tokens. A static security scan graded it C with 2 findings (reaches for credential files, cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

build-mcp-server

This skill should be used when the user asks to "build an MCP server", "create an MCP", "make an MCP integration", "wrap an API for Claude", "expose tools to Claude", "make an MCP app", or discusses building something with the Model Context Protocol. It is the entry point for MCP server development — it interrogates…

anthropics/claude-plugins-official · 111 tokens

data-manager-api-setup

Guides developers through client library installation and authentication setup steps for the Data Manager API. Use this skill when a user is getting started with the Data Manager API and needs to setup their local environment, install the client library, or setup access to the API. Don't use for implementing audience…

google/skills · 86 tokens

workers-best-practices

Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.

cloudflare/skills · 25 tokens

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

skd-edit

A focused editor for 1C data composition schemas, the report definitions that describe queries, fields, filters, totals, and parameters. It changes an existing Template.xml file through specific operations.

Nikolay-Shirokov/cc-1c-skills · 55 tokens

skd-info

A structure reader for 1C data composition schemas, the report definitions that contain queries, fields, parameters, and display variants. It gives a compact summary instead of requiring you to read the raw XML.

Nikolay-Shirokov/cc-1c-skills · 52 tokens