Property
Languagepython
Severitylow
CWECWE-89: Improper Neutralization of Special Elements used in an SQL Command (‘SQL Injection’)
OWASPA01:2017 - Injection
Confidence LevelMedium
Impact LevelLow
Likelihood LevelLow

Description#

Building SQL queries by concatenating or formatting user input into strings and passing them to sqlalchemy.text() can allow attackers to inject malicious SQL code. This approach bypasses SQLAlchemy’s built-in protections, making your code vulnerable to SQL injection.

Impact#

If exploited, an attacker could execute arbitrary SQL commands against your database, potentially leading to data theft, data manipulation, or deletion. This could compromise sensitive information, disrupt application functionality, or even result in a complete database breach.