{"cve":"CVE-2024-27304","nvd":{"published":"2024-03-06T19:15:08.767","modified":"2026-06-17T07:19:36.673","status":"Analyzed","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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-89","CWE-190"],"references":["https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007","https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8","https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4","https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8","https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df"],"products":["jackc:pgproto3","jackc:pgx"],"source":"nvd","synced_at":"2026-10-19T21:46:54.846886191+00:00"},"epss":{"cve":"CVE-2024-27304","score":0.01109,"percentile":0.65907,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-7jwh-3vrq-q3m8","url":"https://osv.dev/vulnerability/GHSA-7jwh-3vrq-q3m8","summary":"pgproto3 SQL Injection via Protocol Message Size Overflow","modified":"2026-09-10T03:50:00.236184063Z","packages":[{"ecosystem":"Go","name":"github.com/jackc/pgproto3","purl":"pkg:golang/github.com/jackc/pgproto3","ranges":["<2.3.3"],"fixed":["2.3.3"]},{"ecosystem":"Go","name":"github.com/jackc/pgproto3/v2","purl":"pkg:golang/github.com/jackc/pgproto3/v2","ranges":["<2.3.3"],"fixed":["2.3.3"]}]},{"id":"GHSA-mrww-27vc-gghv","url":"https://osv.dev/vulnerability/GHSA-mrww-27vc-gghv","summary":"pgx SQL Injection via Protocol Message Size Overflow","modified":"2026-09-10T03:50:10.601755576Z","packages":[{"ecosystem":"Go","name":"github.com/jackc/pgx","purl":"pkg:golang/github.com/jackc/pgx","ranges":["<4.18.2"],"fixed":["4.18.2"]},{"ecosystem":"Go","name":"github.com/jackc/pgx","purl":"pkg:golang/github.com/jackc/pgx","ranges":[">=5.0.0 <5.5.4"],"fixed":["5.5.4"]},{"ecosystem":"Go","name":"github.com/jackc/pgx/v4","purl":"pkg:golang/github.com/jackc/pgx/v4","ranges":["<4.18.2"],"fixed":["4.18.2"]},{"ecosystem":"Go","name":"github.com/jackc/pgx/v5","purl":"pkg:golang/github.com/jackc/pgx/v5","ranges":[">=5.0.0 <5.5.4"],"fixed":["5.5.4"]}]},{"id":"GO-2024-2606","url":"https://osv.dev/vulnerability/GO-2024-2606","summary":"SQL injection in github.com/jackc/pgproto3 and github.com/jackc/pgx","modified":"2026-02-04T03:55:09.802349Z","packages":[{"ecosystem":"Go","name":"github.com/jackc/pgproto3/v2","purl":"pkg:golang/github.com/jackc/pgproto3/v2","ranges":["<2.3.3"],"fixed":["2.3.3"]},{"ecosystem":"Go","name":"github.com/jackc/pgx","purl":"pkg:golang/github.com/jackc/pgx","ranges":["all versions"],"fixed":[]},{"ecosystem":"Go","name":"github.com/jackc/pgx/v4","purl":"pkg:golang/github.com/jackc/pgx/v4","ranges":["<4.18.2"],"fixed":["4.18.2"]},{"ecosystem":"Go","name":"github.com/jackc/pgx/v5","purl":"pkg:golang/github.com/jackc/pgx/v5","ranges":[">=5.0.0 <5.5.4"],"fixed":["5.5.4"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}