Assuming it is properly shielded, it does not make you vulnerable. The fact is that escaping properly is more difficult than at first glance, and you condemn yourself to run away properly every time you make such a request. If possible, avoid all these problems and use prepared statements (or related parameters or parameterized queries). The idea is to allow the data access library to exit the values correctly.
For example, in PHP using mysqli :
$db_connection = new mysqli("localhost", "user", "pass", "db"); $statement = $db_connection->prepare("SELECT thing FROM stuff WHERE id = ?"); $statement->bind_param("i", $user_id); //$user_id is an integer which goes //in place of ? $statement->execute();
source share