This vulnerability occurs when an application builds a query for a data store (like a database) but fails to properly sanitize user-controlled input. This allows an attacker to inject special elements that change the query's intended logic, potentially accessing or manipulating data in unauthorized ways.
Attackers can exploit this flaw to manipulate query logic in several harmful ways. They can alter search criteria to return different records, append extra commands, or change the number or order of results. This isn't just about stealing data; if your application logic assumes a specific result—like a single administrative user record—manipulating the query can cause it to incorrectly grant permissions or make flawed decisions based on tainted results. While SQL injection is the most well-known example, this risk applies to many query languages. NoSQL databases, LDAP queries, XPath, and other data querying systems (like HTSQL, DQL, or XQuery) are also vulnerable if input isn't properly neutralized. The core issue is trusting user input within any command that interprets logic, not just traditional SQL.
Impact: Bypass Protection MechanismRead Application DataModify Application DataVaries by Context
c#bashbashbashbashbashjavaxmljavabash