/security-agent-skills:hunting-xxe-and-xml-parser-trustfrom security-agent-skills
Hunts XML External Entity (XXE) injection and unsafe XML parser features. Covers in-band file disclosure, blind out-of-band exfiltration, and denial of service via entity expansion. Use when a service parses untrusted XML from request bodies, uploads, or federated messages.
Ships in security-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An XML parser is dangerous when it honors the parts of the XML specification that let a document reach outside itself: a document type definition can declare external entities that the parser resolves by reading a local file or fetching a URL, parameter entities can drive that resolution even when the result is never reflected, and XInclude can pull in external content directly. Untrusted XML that reaches such a parser turns into local file disclosure, server-side request forgery including to internal and cloud-metadata endpoints, blind out-of-band exfiltration, and denial of service by recursive entity expansion. The XML is frequently not obvious: office documents, SVG images, SOAP envelopes, and federated identity assertions all carry XML into a parser. The one fact that governs everything is how the specific parser is configured. You find XXE by locating every XML parse of untrusted input and reading whether DTDs and external entities are enabled.
Test XXE only against services you own or are authorized to assess, on non-production infrastructure, because a confirmed case reads server files or reaches internal endpoints. Use inert markers and a destination you control for any out-of-band probe, and stay within the authorized scope. If you can't name the authorization, stop.
Establish the parser configuration first. For each XML parse of untrusted input, read how the parser is constructed: whether DTD processing, external general entities, external parameter entities, and XInclude are enabled or disabled, on the exact library and version in use. This is the false-positive killer: a parser with secure processing on and external entities off is not vulnerable no matter what the document declares. Name the configuration before judging the document.
Find every XML entry point, including hidden ones. Inventory request bodies, upload handlers, and federated message endpoints, and note the formats that carry XML inside them: office documents, SVG, SOAP, and identity assertions. Each is a path to a parser and must be checked, not just the endpoints that declare an XML content type.
Determine in-band versus blind reachability. Decide whether the parsed result is reflected back to the caller, enabling direct in-band file or URL disclosure, or whether nothing is returned, in which case a parameter-entity, out-of-band channel to a destination you control is the confirmation path. The channel changes how you prove it, not whether it exists.
Assess the reachable impact. From an entity-resolving parser, determine what is reachable: local file reads, requests to internal services and cloud metadata, out-of-band exfiltration, and expansion-based denial of service. Assess this from the parser capability and the network position, using inert probes rather than pulling sensitive files.
Read the neutralization that would hold. Determine whether the parser disables DTDs entirely (the strongest control), or disables external general and parameter entities and XInclude, or runs a secure processing mode that does so. Check that the setting is applied to every parser instance on the path, including ones inside format-specific loaders, not just the primary one.
Confirm and record. Confirm by parsing a document with an inert external entity that reads a non-sensitive local marker or contacts a destination you control on an authorized instance, observing the read or the callback. Kill the lead if the parser disables DTDs or external entities and XInclude, if a secure processing mode is applied to every instance on the path, or if no untrusted XML reaches an entity-resolving parser. Record the entry point, the parser and its configuration, the channel (in-band or out-of-band), and the reachable impact.
Confirm. An import endpoint accepts an office document and parses its embedded XML with a parser built without a secure configuration, DTDs and external entities enabled. A document carrying an external entity that reads a non-sensitive local marker returns that marker in the response, and a parameter-entity variant reaches a destination the tester controls. Confirmed XXE with file disclosure and server-side request forgery,
high, remediation = disable DTD processing on every XML parser on the path, or at minimum disable external general and parameter entities and XInclude, and apply the setting inside the document-format loader as well.Kill. The endpoint constructs every parser, including the one inside the document loader, with DTD processing disabled and secure processing on, so external entities and XInclude do not resolve. A document declaring an external entity parses with the entity unresolved and no request leaves the host. Killed,
kill_reason= "every parser on the path disables DTDs and external entities with secure processing on; no declared entity resolves to a file read or a network fetch."
You need every place untrusted XML is parsed, the formats that carry XML into those parsers, the exact parser construction and version, and whether DTDs, external entities, and XInclude are enabled. For each, decide whether the configuration resolves entities and what a resolved entity reaches. Reading the parser construction shows the configuration; parsing a document with an inert entity that reads a marker or contacts a controlled destination shows whether it resolves.
hunting-xpath-and-xml-query-injection - the other XML-surface class, where the bug is a query built by
concatenation rather than an entity-resolving parser.exploiting-ssrf-to-cloud-metadata - the escalation path when an external entity reaches an internal or
metadata endpoint.auditing-file-upload-and-content-handling - the upload angle, where a format that carries XML reaches a
parser through an upload handler.hunting-dns-rebinding-and-ssrf-pivots - a related outbound-request pivot useful when the entity fetch
reaches internal services.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
xxe, xml-security, entity-injection, security-audit, parser-hardening
npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skills194 skills in this plugin
/adjudicating-dependency-cve-reachabilityDecide whether a CVE in a dependency actually exposes your application before you scramble to patch: is the vulnerable function on a real call path from your code, do the trigger preconditions hold, and can an attacker control the input that reaches it. Use when an advisory, SCA scan, or dependency bot flags a CVE and you must separate a genuine exposure from unreachable noise, or justify why you are or are not affected. Covers pinning the vulnerable symbol, call-path reachability, precondition checks, and taint from your entry points./adjudicating-taint-pathsDecide whether a whitebox lead is a real bug by tracing taint from an untrusted source to a dangerous sink and confirming every hop against live source. Use after a scanner, a candidate list, or your own reading surfaces a "this looks dangerous" sink (SQL exec, system/exec, file open, deserialize, template render, redirect target, memcpy) and you must decide whether attacker- controlled input actually reaches it - or kill the lead with evidence. Covers forward and reverse taint, witness paths, sanitizer analysis, and the evidence rules that separate a finding from a false positive.Other plugins' skills for the same job