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

Description#

Building SQL queries by concatenating variables or using string formatting in go-pg can expose your code to SQL injection if any part of the query comes from user input. Instead, always use parameterized queries to safely handle dynamic values.

Impact#

If exploited, an attacker could manipulate the database query to access, modify, or delete data, bypass authentication, or execute unintended commands. This can lead to data breaches, data loss, or full compromise of your application’s database.