XQuery Injection occurs when an application uses unvalidated user input to build an XQuery expression for querying an XML database. Without proper neutralization, an attacker can manipulate the query's structure.
This vulnerability allows an attacker to alter the intended logic of database queries. By injecting malicious XQuery code, they can force the database to return unauthorized data, bypass authentication checks, or modify application behavior. Successful exploitation can lead to data theft, logic manipulation, and complete bypass of security controls. Developers must treat all external input as untrusted and use parameterized queries or safe XQuery builders to prevent direct command injection into the XML data layer.
Impact: Read Application Data
An attacker might be able to read sensitive information from the XML database.
High