{"answers":{"affected":"13 open source packages ship an affected version, including org.postgresql:postgresql and postgresql-jdbc-driver. It affects 2 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1597 exists.","fix":"Upgrade org.postgresql:postgresql to a fixed version for your release line: 42.2.28, 42.3.9, 42.4.4 or 42.5.5.","what":"CVE-2024-1597 is a critical SQL injection vulnerability in Fedoraproject Fedora, published on 19 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-1597 and fix it if it is affected.\n\nWhat it is: CVE-2024-1597 is a critical SQL injection vulnerability in Fedoraproject Fedora, published on 19 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1597 exists.\n\nAffected packages and fixed versions:\n- org.postgresql:postgresql (Maven): affected all versions; fixed in 42.2.28\n- org.postgresql:postgresql (Maven): affected all versions; fixed in 42.2.28\n- org.postgresql:postgresql (Maven): affected from 42.3.0; fixed in 42.3.9\n- org.postgresql:postgresql (Maven): affected from 42.3.0; fixed in 42.3.9\n- org.postgresql:postgresql (Maven): affected from 42.4.0; fixed in 42.4.4\n- org.postgresql:postgresql (Maven): affected from 42.4.0; fixed in 42.4.4\n- org.postgresql:postgresql (Maven): affected from 42.5.0; fixed in 42.5.5\n- org.postgresql:postgresql (Maven): affected from 42.5.0; fixed in 42.5.5\n- org.postgresql:postgresql (Maven): affected from 42.6.0; fixed in 42.6.1\n- org.postgresql:postgresql (Maven): affected from 42.6.0; fixed in 42.6.1\n- org.postgresql:postgresql (Maven): affected from 42.7.0; fixed in 42.7.2\n- org.postgresql:postgresql (Maven): affected from 42.7.0; fixed in 42.7.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-1597/ (Markdown: https://insights.sbomify.com/CVE-2024-1597/index.md)","id":"CVE-2024-1597","markdown":"https://insights.sbomify.com/CVE-2024-1597/index.md","name":"CVE-2024-1597","record":{"aliases":["ALSA-2024:1435","ALSA-2024:1436","BIT-postgresql-jdbc-driver-2024-1597","CLEANSTART-2026-DW89349","CLSA-2025-1754870602","CLSA-2025-1762243790","DEBIAN-CVE-2024-1597","DLA-3812-1","GHSA-24rp-q3w6-vc56","MGASA-2024-0120","MINI-29hr-h2v4-458g","MINI-m295-6px4-49mx","MINI-qg9w-fhw8-2m4r","OESA-2024-1237","RHSA-2024:1435","RHSA-2024:1436","RHSA-2024:1649","RHSA-2024:1999","RHSA-2024:2624","RHSA-2024:3313","RHSA-2024:4375","RHSA-2024:4402","RLSA-2024:1435","RLSA-2024:1436","ROOT-APP-MAVEN-CVE-2024-1597","SUSE-SU-2024:0769-1","SUSE-SU-2024:0771-1","SUSE-SU-2024:0773-1","UBUNTU-CVE-2024-1597","openSUSE-SU-2024:13734-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify","data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"PostgreSQL JDBC Driver","requires_auth":"none","summary":"Attackers can inject SQL via crafted numeric and string placeholders when PreferQueryMode is set to SIMPLE, bypassing parameterized query protections.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"PostgreSQL","cpe":[{"product":"fedora","vendor":"fedoraproject"},{"product":"postgresql_jdbc_driver","vendor":"postgresql"}],"cvss":{"score":10,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"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 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.","ecosystems":["AlmaLinux:8","AlmaLinux:9","Bitnami","Maven","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:9::appstream","Red Hat:rhel_aus:8.2::appstream","Red Hat:rhel_aus:8.4::appstream","Red Hat:rhel_aus:8.6::appstream","Red Hat:rhel_e4s:8.2::appstream","Red Hat:rhel_e4s:8.4::appstream","Red Hat:rhel_e4s:8.6::appstream","Red Hat:rhel_eus:8.8::appstream","Red Hat:rhel_eus:9.0::appstream","Red Hat:rhel_eus:9.2::appstream","Red Hat:rhel_tus:8.2::appstream","Red Hat:rhel_tus:8.4::appstream","Red Hat:rhel_tus:8.6::appstream","Rocky Linux:8","Rocky Linux:9","SUSE:Enterprise Storage 7.1","SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","SUSE:Linux Enterprise Module for Server Applications 15 SP5","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server 15 SP3-LTSS","SUSE:Linux Enterprise Server 15 SP4-LTSS","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 15 SP3","SUSE:Linux Enterprise Server for SAP Applications 15 SP4","SUSE:Manager Proxy 4.3","SUSE:Manager Server 4.3","openSUSE:Leap 15.5"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"pgjdbc SQL Injection via line comment generation","id":"CVE-2024-1597","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"fedoraproject:fedora","products":["fedoraproject:fedora"],"type":"sql_injection","year":"2024"},"n_packages":57,"n_references":7,"next":{"headline":"Potential buffer overflow when handling UEFI variables","id":"CVE-2024-1598"},"packages":[{"ecosystem":"Bitnami","fixed":["42.2.28","42.3.9","42.4.4","42.5.5","42.6.1","42.7.2"],"introduced":["0","42.3.0","42.4.0","42.5.0","42.6.0","42.7.0"],"last_affected":[],"package":"postgresql-jdbc-driver","purl":"pkg:bitnami/postgresql-jdbc-driver","source":"BIT-postgresql-jdbc-driver-2024-1597"},{"ecosystem":"Maven","fixed":["42.2.28"],"introduced":["0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.2.28"],"introduced":["0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.3.9"],"introduced":["42.3.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.3.9"],"introduced":["42.3.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.4.4"],"introduced":["42.4.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.4.4"],"introduced":["42.4.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.5.5"],"introduced":["42.5.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.5.5"],"introduced":["42.5.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.6.1"],"introduced":["42.6.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.6.1"],"introduced":["42.6.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.7.2"],"introduced":["42.7.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"Maven","fixed":["42.7.2"],"introduced":["42.7.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-24rp-q3w6-vc56"},{"ecosystem":"AlmaLinux:8","fixed":["42.2.14-3.el8_9"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/almalinux/postgresql-jdbc","source":"ALSA-2024:1435"},{"ecosystem":"AlmaLinux:8","fixed":["42.2.14-3.el8_9"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/almalinux/postgresql-jdbc-javadoc","source":"ALSA-2024:1435"},{"ecosystem":"AlmaLinux:9","fixed":["42.2.28-1.el9_3"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/almalinux/postgresql-jdbc","source":"ALSA-2024:1436"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:42.2.14-3.el8_9"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:1435"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:42.2.14-3.el8_9"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:1435"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:42.2.28-1.el9_3"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:1436"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:42.2.3-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:2624"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:42.2.3-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:2624"},{"ecosystem":"Red Hat:rhel_aus:8.4::appstream","fixed":["0:42.2.3-7.el8_4"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:4375"},{"ecosystem":"Red Hat:rhel_aus:8.4::appstream","fixed":["0:42.2.3-7.el8_4"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:4375"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["0:42.2.3-5.el8_6"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:4402"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["0:42.2.3-5.el8_6"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:4402"},{"ecosystem":"Red Hat:rhel_e4s:8.2::appstream","fixed":["0:42.2.3-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:2624"},{"ecosystem":"Red Hat:rhel_e4s:8.2::appstream","fixed":["0:42.2.3-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:2624"},{"ecosystem":"Red Hat:rhel_e4s:8.4::appstream","fixed":["0:42.2.3-7.el8_4"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:4375"},{"ecosystem":"Red Hat:rhel_e4s:8.4::appstream","fixed":["0:42.2.3-7.el8_4"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:4375"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["0:42.2.3-5.el8_6"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:4402"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["0:42.2.3-5.el8_6"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:4402"},{"ecosystem":"Red Hat:rhel_eus:8.8::appstream","fixed":["0:42.2.14-5.el8_8"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:3313"},{"ecosystem":"Red Hat:rhel_eus:8.8::appstream","fixed":["0:42.2.14-5.el8_8"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:3313"},{"ecosystem":"Red Hat:rhel_eus:9.0::appstream","fixed":["0:42.2.28-1.el9_0"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:1999"},{"ecosystem":"Red Hat:rhel_eus:9.2::appstream","fixed":["0:42.2.28-1.el9_2"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:1649"},{"ecosystem":"Red Hat:rhel_tus:8.2::appstream","fixed":["0:42.2.3-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:2624"},{"ecosystem":"Red Hat:rhel_tus:8.2::appstream","fixed":["0:42.2.3-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:2624"},{"ecosystem":"Red Hat:rhel_tus:8.4::appstream","fixed":["0:42.2.3-7.el8_4"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:4375"},{"ecosystem":"Red Hat:rhel_tus:8.4::appstream","fixed":["0:42.2.3-7.el8_4"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2024:4375"},{"ecosystem":"Red Hat:rhel_tus:8.6::appstream","fixed":["0:42.2.3-5.el8_6"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2024:4402"}],"prev":{"headline":"Ninja Forms File Uploads \u003c= 3.3.16 - Unauthenticated Stored Cross-Site Scripting via File Upload","id":"CVE-2024-1596"},"products":["pgjdbc"],"published":"2024-02-19","related":[{"cvss_score":9.8,"headline":"PHP-CGI OS Command Injection","id":"CVE-2024-4577","kev_date_added":"2024-06-12","published":"2024-06-09"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2021-39226","kev_date_added":"2022-08-25","published":"2021-10-05"},{"cvss_score":9.8,"headline":"VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow","id":"CVE-2019-5544","kev_date_added":"2021-11-03","published":"2019-12-06"},{"cvss_score":9.6,"headline":"Google Chromium V8 Type Confusion","id":"CVE-2024-4947","kev_date_added":"2024-05-20","published":"2024-05-15"},{"cvss_score":9.6,"headline":"Google Chromium Visuals Use-After-Free","id":"CVE-2024-4671","kev_date_added":"2024-05-13","published":"2024-05-09"},{"cvss_score":9.6,"headline":"Google Chromium Mojo Insufficient Data Validation","id":"CVE-2022-3075","kev_date_added":"2022-09-08","published":"2022-09-26"},{"cvss_score":9.6,"headline":"Google Chromium Indexed DB API Use-After-Free","id":"CVE-2021-30633","kev_date_added":"2021-11-03","published":"2021-10-08"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["pgjdbc"]},"summary":"Attackers can inject SQL via crafted numeric and string placeholders when PreferQueryMode is set to SIMPLE, bypassing parameterized query protections.","url":"https://insights.sbomify.com/CVE-2024-1597/"}