Skip to content

Commit 7af1529

Browse files
1 parent 2f2e35a commit 7af1529

1 file changed

Lines changed: 101 additions & 0 deletions

File tree

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-j88v-2chj-qfwx",
4+
"modified": "2026-04-22T20:46:51Z",
5+
"published": "2026-04-22T20:46:51Z",
6+
"aliases": [],
7+
"summary": "pgx: SQL Injection via placeholder confusion with dollar quoted string literals",
8+
"details": "### Impact\n\nSQL Injection can occur when:\n\n1. The non-default simple protocol is used.\n2. A dollar quoted string literal is used in the SQL query.\n3. That string literal contains text that would be would be interpreted as a placeholder outside of a string literal.\n4. The value of that placeholder is controllable by the attacker.\n\ne.g.\n\n```go\nattackValue := `$tag$; drop table canary; --`\n_, err = tx.Exec(ctx, `select $tag$ $1 $tag$, $1`, pgx.QueryExecModeSimpleProtocol, attackValue)\n```\n\nThis is unlikely to occur outside of a contrived scenario.\n\n### Patches\n\nThe problem is resolved in v5.9.2.\n\n### Workarounds\n\nDo not use the simple protocol to execute queries matching all the above conditions.",
9+
"severity": [
10+
{
11+
"type": "CVSS_V4",
12+
"score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "Go",
19+
"name": "github.com/jackc/pgx/v5"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "5.9.2"
30+
}
31+
]
32+
}
33+
]
34+
},
35+
{
36+
"package": {
37+
"ecosystem": "Go",
38+
"name": "github.com/jackc/pgx/v4"
39+
},
40+
"ranges": [
41+
{
42+
"type": "ECOSYSTEM",
43+
"events": [
44+
{
45+
"introduced": "0"
46+
},
47+
{
48+
"last_affected": "4.18.3"
49+
}
50+
]
51+
}
52+
]
53+
},
54+
{
55+
"package": {
56+
"ecosystem": "Go",
57+
"name": "github.com/jackc/pgx"
58+
},
59+
"ranges": [
60+
{
61+
"type": "ECOSYSTEM",
62+
"events": [
63+
{
64+
"introduced": "0"
65+
},
66+
{
67+
"last_affected": "3.6.2"
68+
}
69+
]
70+
}
71+
]
72+
}
73+
],
74+
"references": [
75+
{
76+
"type": "WEB",
77+
"url": "https://github.com/jackc/pgx/security/advisories/GHSA-j88v-2chj-qfwx"
78+
},
79+
{
80+
"type": "WEB",
81+
"url": "https://github.com/jackc/pgx/commit/60644f84918a8af66d14a4b0d865d4edafd955da"
82+
},
83+
{
84+
"type": "PACKAGE",
85+
"url": "https://github.com/jackc/pgx"
86+
},
87+
{
88+
"type": "WEB",
89+
"url": "https://github.com/jackc/pgx/releases/tag/v5.9.2"
90+
}
91+
],
92+
"database_specific": {
93+
"cwe_ids": [
94+
"CWE-89"
95+
],
96+
"severity": "LOW",
97+
"github_reviewed": true,
98+
"github_reviewed_at": "2026-04-22T20:46:51Z",
99+
"nvd_published_at": null
100+
}
101+
}

0 commit comments

Comments
 (0)