Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-j88v-2chj-qfwx

Опубликовано: 22 апр. 2026
Источник: github
Github: Прошло ревью
CVSS4: 2.3

Описание

pgx: SQL Injection via placeholder confusion with dollar quoted string literals

Impact

SQL Injection can occur when:

  1. The non-default simple protocol is used.
  2. A dollar quoted string literal is used in the SQL query.
  3. That string literal contains text that would be would be interpreted as a placeholder outside of a string literal.
  4. The value of that placeholder is controllable by the attacker.

e.g.

attackValue := `$tag$; drop table canary; --` _, err = tx.Exec(ctx, `select $tag$ $1 $tag$, $1`, pgx.QueryExecModeSimpleProtocol, attackValue)

This is unlikely to occur outside of a contrived scenario.

Patches

The problem is resolved in v5.9.2.

Workarounds

Do not use the simple protocol to execute queries matching all the above conditions.

Пакеты

Наименование

github.com/jackc/pgx/v5

go
Затронутые версииВерсия исправления

< 5.9.2

5.9.2

Наименование

github.com/jackc/pgx/v4

go
Затронутые версииВерсия исправления

<= 4.18.3

Отсутствует

Наименование

github.com/jackc/pgx

go
Затронутые версииВерсия исправления

<= 3.6.2

Отсутствует

EPSS

Процентиль: 28%
0.00356
Низкий

2.3 Low

CVSS4

Дефекты

CWE-89

Связанные уязвимости

CVSS3: 9.8
ubuntu
3 месяца назад

pgx is a PostgreSQL driver and toolkit for Go. Prior to version 5.9.2, SQL injection can occur when the non-default simple protocol is used, a dollar quoted string literal is used in the SQL query, that string literal contains text that would be would be interpreted as a placeholder outside of a string literal, and the value of that placeholder is controllable by the attacker. This issue has been patched in version 5.9.2.

CVSS3: 5.9
redhat
3 месяца назад

pgx is a PostgreSQL driver and toolkit for Go. Prior to version 5.9.2, SQL injection can occur when the non-default simple protocol is used, a dollar quoted string literal is used in the SQL query, that string literal contains text that would be would be interpreted as a placeholder outside of a string literal, and the value of that placeholder is controllable by the attacker. This issue has been patched in version 5.9.2.

CVSS3: 9.8
nvd
3 месяца назад

pgx is a PostgreSQL driver and toolkit for Go. Prior to version 5.9.2, SQL injection can occur when the non-default simple protocol is used, a dollar quoted string literal is used in the SQL query, that string literal contains text that would be would be interpreted as a placeholder outside of a string literal, and the value of that placeholder is controllable by the attacker. This issue has been patched in version 5.9.2.

msrc
3 месяца назад

pgx: SQL Injection via placeholder confusion with dollar quoted string literals

CVSS3: 9.8
debian
3 месяца назад

pgx is a PostgreSQL driver and toolkit for Go. Prior to version 5.9.2, ...

EPSS

Процентиль: 28%
0.00356
Низкий

2.3 Low

CVSS4

Дефекты

CWE-89