Skip to main content

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

CVE-2024-27289

Severity High
Score 8.1/10

Summary

The package pgx is a PostgreSQL driver and toolkit for Go. SQL injection can occur when all of the following conditions are met: the non-default simple protocol is used; a placeholder for a numeric value must be immediately preceded by a minus; there must be a second placeholder for a string value after the first placeholder; both must be on the same line; and both parameter values must be user-controlled. Do not use the simple protocol or do not place a minus directly before a placeholder. This issue affects github.com/jackc/pgx versions 3.0.0 through 4.18.1 and 5.0.0-alpha.1 through 5.5.3.

  • HIGH
  • NETWORK
  • HIGH
  • UNCHANGED
  • NONE
  • NONE
  • HIGH
  • HIGH

CWE-89 - SQL Injection

Structured Query Language (SQL) injection attacks are one of the most common types of vulnerabilities. They exploit weaknesses in vulnerable applications to gain unauthorized access to backend databases. This often occurs when an attacker enters unexpected SQL syntax in an input field. The resulting SQL statement behaves in the background in an unintended manner, which allows the possibility of unauthorized data retrieval, data modification, execution of database administration operations, and execution of commands on the operating system.

Advisory Timeline

  • Published