golang-github-jackc-pgproto3, golang-github-jackc-pgx — security advisory
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.
- Products
- golang-github-jackc-pgproto3, golang-github-jackc-pgx
- Affected versions
- 2.2.0-2, 2.3.2-1, 2.3.3-2, 3.6.2-2, 4.15.0-4, 4.18.1-1, 4.18.1-2, 4.18.3-2
- Fixed versions
- Not specified
- CVEs
- CVE-2024-27304
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 01:12 UTC · Revision 1
Source evidence
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.
osv:UBUNTU-CVE-2024-27304
golang-github-jackc-pgx
Fixed versions: Not specified
golang-github-jackc-pgproto3
Fixed versions: Not specified
golang-github-jackc-pgx
Fixed versions: Not specified
golang-github-jackc-pgproto3
Fixed versions: Not specified
golang-github-jackc-pgx
Fixed versions: Not specified
golang-github-jackc-pgproto3
Fixed versions: Not specified
golang-github-jackc-pgx
Fixed versions: Not specified
golang-github-jackc-pgproto3
Fixed versions: Not specified
golang-github-jackc-pgx
Fixed versions: Not specified
Complete source record
{
"id": "a7507ea14c42721de65e1e31e222b7ddfa2721a6328ba13e521d98028fe5d9e3",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2024-27304",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2024-27304",
"summary": "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.",
"evidence": "osv:UBUNTU-CVE-2024-27304",
"products": [
{
"name": {
"value": "golang-github-jackc-pgx",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.6.2-2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "golang-github-jackc-pgproto3",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.2.0-2",
"evidence": "/affected/1/versions"
},
{
"value": "2.3.2-1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "golang-github-jackc-pgx",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.15.0-4",
"evidence": "/affected/2/versions"
},
{
"value": "4.18.1-1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "golang-github-jackc-pgproto3",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.3.2-1",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "golang-github-jackc-pgx",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.18.1-1",
"evidence": "/affected/4/versions"
},
{
"value": "4.18.1-2",
"evidence": "/affected/4/versions"
}
]
},
{
"name": {
"value": "golang-github-jackc-pgproto3",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.3.2-1",
"evidence": "/affected/5/versions"
},
{
"value": "2.3.3-2",
"evidence": "/affected/5/versions"
}
]
},
{
"name": {
"value": "golang-github-jackc-pgx",
"evidence": "/affected/6/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.18.1-2",
"evidence": "/affected/6/versions"
},
{
"value": "4.18.3-2",
"evidence": "/affected/6/versions"
}
]
},
{
"name": {
"value": "golang-github-jackc-pgproto3",
"evidence": "/affected/7/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.3.2-1",
"evidence": "/affected/7/versions"
}
]
},
{
"name": {
"value": "golang-github-jackc-pgx",
"evidence": "/affected/8/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.18.1-2",
"evidence": "/affected/8/versions"
}
]
}
],
"severity": "critical",
"structured": {
"id": "UBUNTU-CVE-2024-27304",
"aliases": [
"UBUNTU-CVE-2024-27304"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-jackc-pgx",
"purl": "pkg:deb/ubuntu/golang-github-jackc-pgx?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"3.6.2-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-27304.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-jackc-pgx-dev",
"binary_version": "3.6.2-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-jackc-pgproto3",
"purl": "pkg:deb/ubuntu/golang-github-jackc-pgproto3?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"2.2.0-2",
"2.3.2-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-27304.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-jackc-pgproto3-v2-dev",
"binary_version": "2.3.2-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-jackc-pgx",
"purl": "pkg:deb/ubuntu/golang-github-jackc-pgx?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"4.15.0-4",
"4.18.1-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-27304.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-jackc-pgx-v4-dev",
"binary_version": "4.18.1-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-jackc-pgproto3",
"purl": "pkg:deb/ubuntu/golang-github-jackc-pgproto3?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"2.3.2-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-27304.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-jackc-pgproto3-v2-dev",
"binary_version": "2.3.2-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-jackc-pgx",
"purl": "pkg:deb/ubuntu/golang-github-jackc-pgx?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"4.18.1-1",
"4.18.1-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-27304.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-jackc-pgx-v4-dev",
"binary_version": "4.18.1-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-jackc-pgproto3",
"purl": "pkg:deb/ubuntu/golang-github-jackc-pgproto3?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"2.3.2-1",
"2.3.3-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-27304.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-jackc-pgproto3-v2-dev",
"binary_version": "2.3.3-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-jackc-pgx",
"purl": "pkg:deb/ubuntu/golang-github-jackc-pgx?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"4.18.1-2",
"4.18.3-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-27304.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-jackc-pgx-v4-dev",
"binary_version": "4.18.3-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-jackc-pgproto3",
"purl": "pkg:deb/ubuntu/golang-github-jackc-pgproto3?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"2.3.2-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-27304.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-jackc-pgproto3-v2-dev",
"binary_version": "2.3.2-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-jackc-pgx",
"purl": "pkg:deb/ubuntu/golang-github-jackc-pgx?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"4.18.1-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-27304.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-jackc-pgx-v4-dev",
"binary_version": "4.18.1-2"
}
]
}
}
],
"modified": "2026-10-17T12:56:43.530100500Z",
"provider": "osv",
"upstream": [
"CVE-2024-27304"
],
"references": [
"https://ubuntu.com/security/CVE-2024-27304",
"https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv",
"https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4",
"https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8",
"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df",
"https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8",
"https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007",
"https://www.cve.org/CVERecord?id=CVE-2024-27304"
]
},
"related_cves": [
{
"value": "CVE-2024-27304",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 356060,
"published_at": "2024-03-06T19:15:00+00:00"
}