CVE-2024-27304: jackc pgproto3 SQL Injection
Vulnerability summary
CVE-2024-27304 is a critical (CVSS 9.8) SQL Injection vulnerability in jackc pgproto3. EPSS estimates a 1.11% chance of exploitation in the next 30 days, higher than 65.3% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 0 · Related 34Timeline
- 06-03-2024PublishedVulnerability first disclosed.
- 12-12-2024Last modifiedVulnerability information updated.
Description
pgx is a PostgreSQL driver and toolkit for Go. SQL injection can occur if an attacker can cause a single query or bind message to exceed 4 GB in size. An integer overflow in the calculated message size can cause the one large message to be sent as multiple messages under the attacker's control. The problem is resolved in v4.18.2 and v5.5.4. As a workaround, reject user input large enough to cause a single query or bind message to exceed 4 GB in size.
CVSS metrics
8 scores · 7 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · WolfiEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · GoEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · ChainguardEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVDNIST9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.11%
Chance of exploitation in the next 30 days
Percentile
65%
Versus all other CVEs
30-day change
0.00 pp
From 1.11% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-89Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
- CWE-190Integer Overflow or WraparoundThe product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
Affected systems
Chainguard43 products
- amass< 4.2.0-r8
- argo-workflows< 3.5.5-r3
- argo-workflows-fips< 3.5.5-r2
- caddy< 2.7.6-r4
- caddy-fips< 2.7.6-r1
Wolfi25 products
- amass< 4.2.0-r8
- argo-workflows< 3.5.5-r3
- caddy< 2.7.6-r4
- ferretdb< 1.20.1-r3
- k3s< 1.29.2-r3
Debian2 products
- golang-github-jackc-pgconnAll versions (No fix recorded) | < 1.14.3-1
- golang-github-jackc-pgxAll versions (No fix recorded) | < 4.18.1-2
Github.com/jackc2 products
- pgproto3< 2.3.3
- pgx< 4.18.2 | ≥ 5.0.0, < 5.5.4 | All versions (No fix recorded)
Github.com/jackc/pgx2 products
- v4< 4.18.2
- v5≥ 5.0.0, < 5.5.4
Ubuntu2 products
- golang-github-jackc-pgproto3All versions (No fix recorded)
- golang-github-jackc-pgxAll versions (No fix recorded)
Github.com/jackc/pgproto31 product
- v2< 2.3.3
8 vendors · 79 products
References
14 links- github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghvX Refsource CONFIRMREPORTAdvisoryWEBVendor Advisory
- github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8X Refsource MISCREPORTAdvisoryWEBVendor Advisory
- github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007X Refsource MISCREPORTFIXWEBPatch
- github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4X Refsource MISCREPORTFIXWEBPatch
- github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8X Refsource MISCREPORTFIXWEBPatch
- github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81dfX Refsource MISCREPORTFIXWEBPatch
Show all 14 references
- github.com/jackc/pgproto3PACKAGE
- github.com/jackc/pgxPACKAGE