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

Description#

Detected SQL statement that is tainted by event object. This could lead to SQL injection if the variable is user-controlled and not properly sanitized. In order to prevent SQL injection, use parameterized queries or prepared statements instead. You can use parameterized statements like so: Example.find_by_sql ["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date]