Cyber Risks · PortSwigger Research

XPath injection

Summary: XPath injection vulnerabilities arise when user-controllable data is incorporated into XPath queries in an unsafe manner, letting an attacker supply crafted input to break out of the data context and interfere with the surrounding query's structure. Depending on the query's purpose, an attacker may be able to read sensitive application data or interfere with application logic.

Bottom line: The source's own guidance is that input should be strictly validated, ideally accepting only short alphanumeric strings, and at minimum rejecting XPath metacharacters such as " ' / @ = * [ ] ( and ) - a short list that is easy to miss in a code review.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related