{"id":"CVE-2024-27304","title":"pgx: SQL Injection via Protocol Message Size Overflow (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…","severity":"high","cvss":8.1,"cvssVector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","cvssSource":"vendor","cwe":"CWE-89","vendor":"Red Hat","product":"RHACS 4.3 for RHEL 8","affected":["migration_toolkit_for_applications 6","advanced_cluster_security 3","ansible_automation_platform 2","enterprise_linux 8","enterprise_linux 9","openshift_container_platform 4","openshift_container_platform_assisted_installer 1","openshift_container_storage 4","openshift_data_science_rhods","openshift_on_aws","openstack_platform 16.2","quay 3","rhacs_4_3_for_rhel 8"],"patched":["rhacs_4_3_for_rhel 8"],"published":"2024-03-06","updated":"2026-09-19","sourceUpdated":"2026-09-19T11:42:52+00:00","source":"CSAF","sourceUrl":"https://security.access.redhat.com/data/csaf/v2/vex/2024/cve-2024-27304.json","references":[{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2024/cve-2024-27304.json"},{"url":"https://access.redhat.com/security/cve/CVE-2024-27304"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2268269"},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-27304"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27304"},{"url":"https://access.redhat.com/errata/RHSA-2024:1321"},{"url":"https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8"},{"url":"https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv"},{"url":"https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007"},{"url":"https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4"},{"url":"https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8"},{"url":"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df"},{"url":"https://github.com/jackc/pgproto3"}],"tags":["csaf","vex","red-hat","exploit-available","osv","go"],"epss":0.01109,"epssPercentile":0.6395,"exploits":{"github":1,"githubRepos":["https://github.com/roaris/CVE-2024-27304-PoC"],"checkedAt":"2026-09-21T15:26:24.291Z"},"exploitAvailable":true,"aliases":["GHSA-7jwh-3vrq-q3m8","GHSA-mrww-27vc-gghv","GO-2024-2606"],"ecosystem":"go","scores":{"vendor":8.1,"osv":9.8},"ingestedAt":"2026-09-12T03:13:01.764Z","slug":"CVE-2024-27304","body":"## Overview\n\npgx 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.\n\n## Vendor advisories\n\n- **RHSA-2024:1321** · Red Hat · fixed in: RHACS 4.3 for RHEL 8 · released 2024-03-13 · [advisory](https://access.redhat.com/errata/RHSA-2024:1321)\n- **Red Hat VEX** · Moderate · affected: Migration Toolkit for Applications 6, Red Hat Advanced Cluster Security 3, Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, Red Hat OpenShift Container Platform 4, … · no fix planned: Red Hat Advanced Cluster Security 3, Migration Toolkit for Applications 6, Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux 8, … · updated 2026-09-19 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2024/cve-2024-27304.json)\n\n**pgx: SQL Injection via Protocol Message Size Overflow** — rated Moderate by Red Hat. Released 2024-03-06, updated 2026-09-19.\n\nAffected:\n\n- Migration Toolkit for Applications 6\n- Red Hat Advanced Cluster Security 3\n- Red Hat Ansible Automation Platform 2\n- Red Hat Enterprise Linux 8\n- Red Hat Enterprise Linux 9\n- Red Hat OpenShift Container Platform 4\n- Red Hat OpenShift Container Platform Assisted Installer 1\n- Red Hat Openshift Container Storage 4\n- Red Hat OpenShift Data Science (RHODS)\n- Red Hat OpenShift on AWS\n- Red Hat OpenStack Platform 16.2\n- Red Hat Quay 3\n\nFixed:\n\n- RHACS 4.3 for RHEL 8\n\nNo fix planned:\n\n- Red Hat Advanced Cluster Security 3\n- Migration Toolkit for Applications 6\n- Red Hat Ansible Automation Platform 2\n- Red Hat Enterprise Linux 8\n- Red Hat Enterprise Linux 9\n- Red Hat OpenShift on AWS\n- Red Hat OpenStack Platform 16.2\n- Red Hat OpenShift Container Platform 4\n- Red Hat OpenShift Container Platform Assisted Installer 1\n- Red Hat Openshift Container Storage 4\n- Red Hat OpenShift Data Science (RHODS)\n- Red Hat Quay 3\n\nNot affected:\n\n- Multicluster Engine for Kubernetes\n- Red Hat Advanced Cluster Management for Kubernetes 2\n- Red Hat Openshift Data Foundation 4\n\n## Remediation\n\nIf you are using an earlier version of RHACS 4.3, you are advised to upgrade to patch release 4.3.5. https://access.redhat.com/errata/RHSA-2024:1321\n\n## Package advisory (CVE-2024-27304)\n\nAffected packages:\n\n- `github.com/jackc/pgproto3 < 2.3.3`\n- `github.com/jackc/pgproto3/v2 < 2.3.3`\n\nPatched in:\n\n- `github.com/jackc/pgproto3 2.3.3`\n- `github.com/jackc/pgproto3/v2 2.3.3`\n\nSource: https://osv.dev/vulnerability/GHSA-7jwh-3vrq-q3m8","depth":"midnight","depthScore":57,"depthScoreParts":{"impact":44.6,"likelihood":0.2,"exploitation":12,"ransomware":0},"changes":[{"seq":207770,"id":"CVE-2024-27304","ts":1789841258403,"field":"cvss","old":"9.8","new":"8.1"},{"seq":207769,"id":"CVE-2024-27304","ts":1789841258403,"field":"severity","old":"critical","new":"high"}]}