SQL Injection Affecting github.com/jackc/pgx/internal/sanitize package, versions <4.18.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.04% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMJACKCPGXINTERNALSANITIZE-6252339
  • published5 Mar 2024
  • disclosed17 Feb 2024
  • creditPaul Gerste

Introduced: 17 Feb 2024

CVE-2024-27289  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade github.com/jackc/pgx/internal/sanitize to version 4.18.2 or higher.

Overview

github.com/jackc/pgx/internal/sanitize is a PostgreSQL driver and toolkit

Affected versions of this package are vulnerable to SQL Injection via Line Comment Creation in the Sanitize() function in sanitize.go, when the non-default "simple protocol" is in use. An attacker can inject SQL statements after a numeric placeholder immediately preceded by a minus and followed by a string placeholder on the same line.

References

CVSS Scores

version 3.1