A flaw was found in the PostgreSQL JDBC Driver. A SQL injection is possible when using the non-default connection property preferQueryMode=simple in combination with application code that has a vulnerable SQL that negates a parameter value.
Do not use the connection propertypreferQueryMode=simple. If you do not explicitly specify a query mode, then you are using the default of extended and are not impacted by this issue.
bugzilla.redhat.com/show_bug.cgi?id=2266523
github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56
nvd.nist.gov/vuln/detail/CVE-2024-1597
www.cve.org/CVERecord?id=CVE-2024-1597
www.enterprisedb.com/docs/jdbc_connector/latest/01_jdbc_rel_notes/
www.enterprisedb.com/docs/security/assessments/cve-2024-1597/