Files
sif/modules/http/xpath-injection-error.yaml
T
TigahandGitHub f8f3b8cca6 feat(modules): add active web-vuln probe modules (#271)
* feat(modules): add active web-vuln probe modules

Add five active-probe modules to modules/http: ssti-reflected (arithmetic
eval proof), command-injection (id output, not payload echo), and error-based
xpath, nosql, and ldap injection. Each keys on a transformed response the
payload cannot produce by reflection, so a benign echo cannot trigger it.

* chore(modules): trim redundant module header comments

drop top-line comments that just restate the id/name fields already
present in the same file
2026-07-22 12:35:27 -07:00

54 lines
1.2 KiB
YAML

id: xpath-injection-error
info:
name: XPath Injection (Error-Based)
author: sif
severity: high
description: Detects XPath injection via XPath parser error messages
tags: [xpath, injection, xml, owasp-top10]
type: http
http:
method: GET
paths:
- "{{BaseURL}}/?id={{payload}}"
- "{{BaseURL}}/?user={{payload}}"
- "{{BaseURL}}/?name={{payload}}"
- "{{BaseURL}}/?search={{payload}}"
- "{{BaseURL}}/?q={{payload}}"
- "{{BaseURL}}/?query={{payload}}"
payloads:
- "'"
- "\""
- "']"
- "')"
- "1'or'1'='1"
- "count(//*)"
threads: 10
matchers:
- type: regex
part: body
regex:
- "XPathException"
- "org\\.apache\\.xpath"
- "javax\\.xml\\.xpath"
- "MS\\.Internal\\.Xml"
- "System\\.Xml\\.XPath"
- "SimpleXMLElement::xpath"
- "xmlXPathEval"
- "Warning.*?xpath"
- "supplied argument is not a valid XPath"
- "Expression must evaluate to a node-set"
condition: or
extractors:
- type: regex
name: xpath_error
part: body
regex:
- "(XPathException|SimpleXMLElement::xpath|xmlXPathEval|org\\.apache\\.xpath)"
group: 1