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
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026