# CVE-2024-1597: pgjdbc SQL Injection via line comment generation

- Priority: **Prioritise**
- Reason: Severe, CVSS 10 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 5% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2024-02-19 · Modified: 2025-11-03
- Aliases: MGASA-2024-0120, SUSE-SU-2024:0769-1, SUSE-SU-2024:0771-1, SUSE-SU-2024:0773-1, RHSA-2024:1435, RHSA-2024:1436, RHSA-2024:1649, RHSA-2024:1999, RHSA-2024:2624, RHSA-2024:3313, RHSA-2024:4375, RHSA-2024:4402, UBUNTU-CVE-2024-1597, DEBIAN-CVE-2024-1597, DLA-3812-1, CGA-23cr-9wrj-xg5r, CGA-24jw-57qm-483f, CGA-256p-889g-gcj6, CGA-26wj-w2w3-cq6h, CGA-26xr-hpwm-hr8r, CGA-27jm-x265-v6f7, CGA-287w-wgf2-vvp5, CGA-29pw-xcpm-p3r9, CGA-2h4j-4w9p-gcc4, CGA-2mj4-6432-hwxf, CGA-2vw9-44hg-hm99, CGA-3489-3384-w23q, CGA-37h8-3j7p-4v4v, CGA-39wh-mrpm-29wc, CGA-3h3x-3gv7-vf87, CGA-3hpr-hh9v-c6jg, CGA-3m5g-55p7-qm3x, CGA-3r92-7fgf-fffc, CGA-45w4-8958-qj5x, CGA-465f-rm87-7mv4, CGA-48f2-xw9w-g4vr, CGA-49v5-v858-vp9c, CGA-49w2-g2fr-f835, CGA-4f92-948c-vm77, CGA-4mrw-x673-pp6w, CGA-4q26-xgw7-2596, CGA-4v9c-545r-722j, CGA-5638-8v4r-q7f8, CGA-583c-j848-xg65, CGA-5f88-78mq-rmh9, CGA-5j2j-wfhh-xfmm, CGA-5j39-qc24-p827, CGA-5j57-88v5-vwj6, CGA-5m35-pxmw-6wmh, CGA-5mvh-7374-9g37, CGA-5pjm-33mf-3rfh, CGA-5v53-vcwj-rvjc, CGA-5w5j-95gm-vhvp, CGA-652p-hgpg-vvc4, CGA-68rr-p265-qp8h, CGA-68xv-9mc6-4jjh, CGA-69v7-w793-79w6, CGA-6c5f-wqfm-837c, CGA-6f3h-8qh3-9qpc, CGA-6hw3-hp63-79cm, CGA-6jpv-9q35-h86p, CGA-72xc-4xr6-mq6f, CGA-763v-v4xc-rwqm, CGA-7957-8jr3-4gv4, CGA-799p-rmv7-jw99, CGA-7fp5-qhrh-rg9x, CGA-7gjc-wr72-fp4r, CGA-7h34-7vhq-j259, CGA-7hjm-r233-rp6w, CGA-7j55-qmgm-c4gv, CGA-7pwc-fqx7-ccm7, CGA-7q8c-wcp8-x7w9, CGA-7r92-jm68-6jqq, CGA-7rfq-x85g-pg5w, CGA-7w7f-g9gv-mwp6, CGA-7x3q-m92q-jxgv, CGA-84pq-gmrq-4mcc, CGA-87g9-wmx8-736r, CGA-8cqj-xpcr-rgh6, CGA-8g3g-83cr-w6fv, CGA-8grw-p868-cjfg, CGA-8j6q-8p73-3859, CGA-8mxj-m334-rhxh, CGA-8q3f-79hw-5gwp, CGA-93g7-62vg-5f59, CGA-94jw-5hvj-jcw2, CGA-94wc-92hv-hgcg, CGA-97rr-x6vq-hxxm, CGA-98cc-cm8r-p76j, CGA-9g37-8p8f-v6x8, CGA-9g85-c64q-qfw5, CGA-9gvx-9h4x-88r5, CGA-9hfm-7vjc-9452, CGA-9qwp-f7h4-c92f, CGA-9vmg-7qh3-jw33, CGA-9vwx-h3jv-56xj, CGA-9w8r-m2c8-vhvm, CGA-9wvx-v54p-9c3c, CGA-c2ch-3vqj-gp8x, CGA-cccp-wj6w-6wgh, CGA-cfg3-3fcg-wmx8, CGA-cfmv-3w2m-qq84, CGA-ch8m-vw8p-839q, CGA-cpfm-hwc8-663v, CGA-cpmr-32m4-7wv5, CGA-cx7c-j29f-2vpx, CGA-cxxv-m53w-34mp, CGA-f39p-7fwm-x9h6, CGA-f48x-chxc-phjc, CGA-ff9j-wwc3-9569, CGA-frpc-hv4x-h3wg, CGA-g4mm-5qv9-jv3j, CGA-gcj3-4fv4-8qhq, CGA-gcrg-h6mg-24v4, CGA-gg8j-pmrv-539c, CGA-gqg9-mxmg-f9fh, CGA-gw49-45mj-465m, CGA-gx39-px45-87qc, CGA-gx92-qr8x-7qmx, CGA-h45p-w32q-fvgm, CGA-hfcc-qmr4-w3pr, CGA-hg8m-7g8h-26wf, CGA-hp9m-f225-ffw5, CGA-j232-4542-7jrc, CGA-j92p-4xv4-47hw, CGA-j99p-rq24-c82m, CGA-jjrv-xm8h-jxf5, CGA-jmq5-586j-c649, CGA-jv6f-jv3q-29q9, CGA-jw4x-2xgv-vvpw, CGA-jw52-v6pg-r7wc, CGA-jwwf-gq3c-rgw8, CGA-jxw9-29gm-ppvh, CGA-m35p-2j4q-5q5j, CGA-m3f8-gvwr-45qf, CGA-m67x-4w3q-v53r, CGA-m6m7-5g9m-25v9, CGA-m84j-5rcr-fj5r, CGA-mghq-4x98-h76q, CGA-mp49-39hh-mgwj, CGA-p27h-3556-x9hj, CGA-p3rh-2r4h-gp9x, CGA-p65f-jf23-7jq5, CGA-p8r5-gqv9-x52w, CGA-pg74-j9xg-qh29, CGA-pg9x-wphx-8r6x, CGA-phrx-49pg-mw9p, CGA-pj42-h3rj-7gj8, CGA-prv6-qj26-57hf, CGA-pww7-59x3-vq7v, CGA-q2c5-w445-6x88, CGA-q54q-fr6w-hf2x, CGA-q9vx-fqgj-p3px, CGA-qf56-48fj-4gf5, CGA-qfxr-fwj7-gp83, CGA-qg29-rqcf-hrgg, CGA-qhxw-5q7v-q4pq, CGA-qm44-8ghx-f5vx, CGA-qqwq-q5mj-pvf4, CGA-r5p2-gggf-cxjp, CGA-r7cm-99q7-v4m5, CGA-r8q2-gx2p-mv69, CGA-r94q-r6gh-9x4x, CGA-rm7g-j33r-4p55, CGA-v56g-3gfq-pp9g, CGA-v8wx-hwfr-67jm, CGA-vm4c-p94w-3mp3, CGA-vqfc-74fj-pphr, CGA-vvhj-6j55-f34j, CGA-vw75-47cm-72mp, CGA-w298-h535-8v2r, CGA-w7jf-v8m7-j2hj, CGA-w83f-hgc9-f6fp, CGA-wf7j-p9gv-gxhw, CGA-wg65-fw5w-455q, CGA-wgpp-25qv-xgrc, CGA-whwh-rxgv-c369, CGA-wpjj-hxm5-645v, CGA-wr72-cwxc-p4rp, CGA-wvff-f3gw-fvrh, CGA-wvpv-75x8-q47x, CGA-x66c-8gc3-4vx8, CGA-x7g8-837q-f5p5, CGA-xq49-hv78-hhff, CGA-xrgj-h56j-rm8r, CGA-xx7v-j39j-xjw3, CGA-xxh9-55jc-j8hj, CGA-5cmg-w6mr-wx73, BIT-postgresql-jdbc-driver-2024-1597, CGA-pp92-9wg6-xwgx, GHSA-24rp-q3w6-vc56, GHSA-xfg6-62px-cxc2, CGA-m9rq-xcgm-xv9m, CGA-mpjm-6x84-f6fw, ALPINE-CVE-2024-1597
- Record: https://cvemate.com/vulnerability/CVE-2024-1597 · JSON: https://cvemate.com/vulnerability/CVE-2024-1597/json

## Description

```text
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.
```

## Signals

- CVSS: 10 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- EPSS: 4.81%, percentile 92.206%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 197)

- alpine java-postgresql-jdbc (Alpine Linux): \< 42.6.2-r0
- chainguard dependency-track (Chainguard): \< 4.10.1-r1
- chainguard dependency-track-bundled (Chainguard): \< 4.10.1-r1
- chainguard keycloak (Chainguard): \< 23.0.7-r0
- chainguard mariadb-10.11 (Chainguard): \< 10.11.8-r2
- chainguard mariadb-10.11-backup (Chainguard): \< 10.11.8-r2
- chainguard mariadb-10.11-bench (Chainguard): \< 10.11.8-r2
- chainguard mariadb-10.11-client (Chainguard): \< 10.11.8-r2
- chainguard mariadb-10.11-dev (Chainguard): \< 10.11.8-r2
- chainguard mariadb-10.11-doc (Chainguard): \< 10.11.8-r2
- chainguard mariadb-10.11-embedded (Chainguard): \< 10.11.8-r2
- chainguard mariadb-10.11-oci-entrypoint (Chainguard): \< 10.11.8-r2
- chainguard mariadb-10.6 (Chainguard): \< 10.6.17-r0
- chainguard mariadb-10.6-backup (Chainguard): \< 10.6.17-r0
- chainguard mariadb-10.6-bench (Chainguard): \< 10.6.17-r0
- chainguard mariadb-10.6-client (Chainguard): \< 10.6.17-r0
- chainguard mariadb-10.6-dev (Chainguard): \< 10.6.17-r0
- chainguard mariadb-10.6-doc (Chainguard): \< 10.6.17-r0
- chainguard mariadb-10.6-embedded (Chainguard): \< 10.6.17-r0
- chainguard mariadb-10.6-oci-entrypoint (Chainguard): \< 10.6.17-r0

## References (first 20 of 53)

- <https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56>
- <https://www.enterprisedb.com/docs/security/assessments/cve-2024-1597/>
- <https://www.enterprisedb.com/docs/jdbc_connector/latest/01_jdbc_rel_notes/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TZQTSMESZD2RJ5XBPSXH3TIQVUW5DIUU/>
- <https://security.netapp.com/advisory/ntap-20240419-0008/>
- <http://www.openwall.com/lists/oss-security/2024/04/02/6>
- <https://lists.debian.org/debian-lts-announce/2024/05/msg00007.html>
- <https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/>
- <https://lists.debian.org/debian-lts-announce/2024/12/msg00017.html>
- <https://advisories.mageia.org/MGASA-2024-0120.html>
- <https://bugs.mageia.org/show_bug.cgi?id=33051>
- <https://www.openwall.com/lists/oss-security/2024/04/02/6>
- <https://www.suse.com/support/update/announcement/2024/suse-su-20240769-1/>
- <https://bugzilla.suse.com/1220644>
- <https://www.suse.com/security/cve/CVE-2024-1597>
- <https://www.suse.com/support/update/announcement/2024/suse-su-20240771-1/>
- <https://www.suse.com/support/update/announcement/2024/suse-su-20240773-1/>
- <https://access.redhat.com/errata/RHSA-2024:1435>
- <https://access.redhat.com/security/updates/classification/#important>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2266523>

---

Data as of 2026-12-05T05:10:20.627Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
