{"id":"GHSA-mrww-27vc-gghv","revision":"daeeacd7b00f42c4b56b961bafc458c4","records":[{"revision":"daeeacd7b00f42c4b56b961bafc458c4","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-mrww-27vc-gghv","aliases":["CVE-2024-27304","GHSA-7jwh-3vrq-q3m8","GO-2024-2606"],"title":"pgx SQL Injection via Protocol Message Size Overflow","description":"### Impact\n\nSQL 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.\n\n### Patches\n\nThe problem is resolved in v4.18.2 and v5.5.4.\n\n### Workarounds\n\nReject user input large enough to cause a single query or bind message to exceed 4 GB in size.\n","state":0,"publishedAt":"2024-03-04T20:43:24+00:00","modifiedAt":"2026-09-10T03:50:10.6017556+00:00","affected":[{"ecosystem":"Go","name":"github.com/jackc/pgx","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.18.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/jackc/pgx","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"5.0.0"},{"kind":"fixed","version":"5.5.4"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/jackc/pgx/v4","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.18.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/jackc/pgx/v5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"5.0.0"},{"kind":"fixed","version":"5.5.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8","https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv","https://nvd.nist.gov/vuln/detail/CVE-2024-27304","https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007","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/pgx","https://www.youtube.com/watch?v=Tfg1B8u1yvE"],"sourceUrl":"https://github.com/advisories/GHSA-mrww-27vc-gghv","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-mrww-27vc-gghv","identifiers":["GHSA-mrww-27vc-gghv","CVE-2024-27304","GHSA-7jwh-3vrq-q3m8","GO-2024-2606"]},"retained":false,"historicalAffected":[]}],"coverage":[]}