{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-1597","id":"CVE-2024-1597","title":"pgjdbc SQL Injection via line comment generation","description":"pgjdbc, the PostgreSQL JDBC Driver, allows attacker to inject SQL if using PreferQueryMode=SIMPLE. Note this is not the default. In the default mode there is no vulnerability. A placeholder for a numeric value must be immediately preceded by a minus. There must be a second placeholder for a string value after the first placeholder; both must be on the same line. By constructing a matching string p","descriptionLong":"pgjdbc, the PostgreSQL JDBC Driver, allows attacker to inject SQL if using PreferQueryMode=SIMPLE. Note this is not the default. In the default mode there is no vulnerability. A placeholder for a numeric value must be immediately preceded by a minus. There must be a second placeholder for a string value after the first placeholder; both must be on the same line. By constructing a matching string payload, the attacker can inject SQL to alter the query,bypassing the protections that parameterized queries bring against SQL Injection attacks. Versions before 42.7.2, 42.6.1, 42.5.5, 42.4.4, 42.3.9, and 42.2.28 are affected.","published":"2024-02-19T12:58:48.620Z","updated":"2026-10-28T10:41:05.940842255Z","reserved":"2024-02-16T22:29:21.969Z","status":"Modified","rejected":false,"assigner":"PostgreSQL","metric":{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"PostgreSQL"},"metrics":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"PostgreSQL"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub"}],"rating":"critical","products":["pgjdbc"],"affectedProducts":[{"vendor":"pgjdbc","product":"pgjdbc","defaultStatus":null,"versions":[{"version":"< 42.7.2","status":"affected"},{"version":"< 42.6.1","status":"affected"},{"version":"< 42.5.5","status":"affected"},{"version":"< 42.4.4","status":"affected"},{"version":"< 42.3.9","status":"affected"},{"version":"< 42.2.28","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Maven","name":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","ranges":["<42.2.28",">=42.3.0 <42.3.9",">=42.4.0 <42.4.4",">=42.5.0 <42.5.5",">=42.6.0 <42.6.1",">=42.7.0 <42.7.2"],"fixed":["42.2.28","42.3.9","42.4.4","42.5.5","42.6.1","42.7.2"],"advisory":"GHSA-24rp-q3w6-vc56"}],"cwes":["CWE-89"],"aliases":["BIT-postgresql-jdbc-driver-2024-1597","GHSA-24rp-q3w6-vc56"],"references":[{"url":"https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56","tags":["x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://www.enterprisedb.com/docs/security/assessments/cve-2024-1597/","tags":["x_transferred","Third Party Advisory","web"]},{"url":"https://www.enterprisedb.com/docs/jdbc_connector/latest/01_jdbc_rel_notes/","tags":["x_transferred","Release Notes","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TZQTSMESZD2RJ5XBPSXH3TIQVUW5DIUU/","tags":["x_transferred","Mailing List","Third Party Advisory","web"]},{"url":"https://security.netapp.com/advisory/ntap-20240419-0008/","tags":["x_transferred","advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2024/04/02/6","tags":["x_transferred","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/05/msg00007.html","tags":["x_transferred","web"]},{"url":"https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/","tags":["article"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00017.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/1xxx/CVE-2024-1597.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-1597","tags":["advisory"]},{"url":"https://github.com/pgjdbc/pgjdbc/commit/06abfb78a627277a580d4df825f210e96a4e14ee","tags":["web"]},{"url":"https://github.com/pgjdbc/pgjdbc/commit/93b0fcb2711d9c1e3a2a03134369738a02a58b40","tags":["web"]},{"url":"https://github.com/pgjdbc/pgjdbc","tags":["package"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total"},"epss":0.0481,"epssPercentile":0.92145,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-1597","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-1597","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-1597","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-24rp-q3w6-vc56","ok":true,"note":"GHSA-24rp-q3w6-vc56"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-1597","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["postgresql"],"critical":["CVSS 10.0 in a widely used technology"],"attention":null}