Skip to main content
← All vulnerabilities
CVE-2024-27289GHSA-M7WR-2XF7-CM9PGO-2024-2605

pgx SQL Injection via Line Comment Creation

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 4.18.2
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: total

Summary

pgx is a PostgreSQL driver and toolkit for Go. Prior to version 4.18.2, 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. The problem is resolved in v4.18.2. As a workaround, do not use the simple protocol or do not place a minus directly before a placeholder.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • jackc pgx

    fixed in 4.18.2

  • github.com/jackc/pgxGo

    fixed in 4.18.2

  • github.com/jackc/pgx/v4Go

    fixed in 4.18.2

  • github.com/jackc/pgxGo

    All versions

References 2

GitHub · jackc/pgx