XPath Injection
High · Injection
OWASP Top 10:2025 (current)
Not directly mapped to a Top 10:2025 category — see CWE / CVE below.
CWE
CWE-643
CVE / class examples
- Search NVD/CVE for product-specific instances of this CWE
All refs
CWE-643
Definition
User input in XPath queries alters logic.
Root cause
String-built XPath.
Affected components
- Components in the “Injection” class
- Application / API handlers
- Supporting libraries
Impact
Auth bypass, data extraction.
Severity
High · CVSS 8.0
Safe lab reproduction
XPath injection labs
Detection methodology
XPath metacharacter tests.
Evidence examples
- Lab reproduction notes: XPath injection labs
- Request/response excerpts (redacted)
- Detection signal: XPath metacharacter tests
Remediation
Parameterized XPath APIs; input validation.
Secure coding examples
Avoid concatenating user input into XPath.
Related CYNARKS lessons & labs
Tools: burp
Practise related skills in Labs or deepen on Academy library.