Patchwire CVEs, their patch status, and feeds to follow them

CVE-2022-31197

Fixed in a distro release EPSS 2%CVSS 7.1

PostgreSQL JDBC Driver (PgJDBC for short) allows Java programs to connect to a PostgreSQL database using standard, database independent Java code. The PGJDBC implementation of the `java.sql.ResultRow.refreshRow()` method is not performing escaping of column names so a malicious column name that contains a statement terminator, e.g. `;`, could lead to SQL injection. This could lead to executing additional SQL commands as the application's JDBC user. User applications that do not invoke the `ResultSet.refreshRow()` method are not impacted. User application that do invoke that method are impacted if the underlying database that they are querying via their JDBC application may be under the control of an attacker. The attack requires the attacker to trick the user into executing SQL against a table name who's column names would contain the malicious SQL and subsequently invoke the `refreshRow()` method on the ResultSet. Note that the application's JDBC user and the schema owner need not be the same. A JDBC application that executes as a privileged user querying database schemas owned by potentially malicious less-privileged users would be vulnerable. In that situation it may be possible for the malicious user to craft a schema that causes the application to execute commands as the privileged user. Patched versions will be released as `42.2.26` and `42.4.1`. Users are advised to upgrade. There are no known workarounds for this issue.

Published 2022-08-03 · CVE record · OSV

Products: pgjdbc

Fixed upstream

EcosystemPackageFixed in
Mavenorg.postgresql:postgresql42.2.26
Mavenorg.postgresql:postgresql42.4.1
Mavenorg.postgresql:postgresql42.3.7

Distro releases

ReleasePackageFixed in
AlmaLinux 9postgresql-jdbc42.2.18-6.el9_1
Chainguardmariadb-10.1110.11.8-r2
Chainguardmariadb-10.11-backup10.11.8-r2
Chainguardmariadb-10.11-bench10.11.8-r2
Chainguardmariadb-10.11-client10.11.8-r2
Chainguardmariadb-10.11-dev10.11.8-r2
Chainguardmariadb-10.11-doc10.11.8-r2
Chainguardmariadb-10.11-embedded10.11.8-r2
Chainguardmariadb-10.11-oci-entrypoint10.11.8-r2
Chainguardmariadb-10.610.6.18-r2
Chainguardmariadb-10.6-backup10.6.18-r2
Chainguardmariadb-10.6-bench10.6.18-r2
Chainguardmariadb-10.6-client10.6.18-r2
Chainguardmariadb-10.6-dev10.6.18-r2
Chainguardmariadb-10.6-doc10.6.18-r2
Chainguardmariadb-10.6-embedded10.6.18-r2
Chainguardmariadb-10.6-oci-entrypoint10.6.18-r2
Chainguardmariadb-10.6-test10.6.18-r2
Chainguardmariadb-11.211.2.3-r2
Chainguardmariadb-11.2-backup11.2.3-r2
Chainguardmariadb-11.2-bench11.2.3-r2
Chainguardmariadb-11.2-client11.2.3-r2
Chainguardmariadb-11.2-dev11.2.3-r2
Chainguardmariadb-11.2-doc11.2.3-r2
Chainguardmariadb-11.2-embedded11.2.3-r2
Chainguardmariadb-11.2-oci-entrypoint11.2.3-r2
Debian 10libpgjava42.2.5-2+deb10u2
Debian 11libpgjava42.2.15-1+deb11u2
Debian 12libpgjava42.4.1-1
Debian 13libpgjava42.4.1-1
Debian 14libpgjava42.4.1-1
Red Hat Enterprise Linux 9postgresql-jdbc0:42.2.18-6.el9_1
Rocky Linux 9postgresql-jdbc0:42.2.18-6.el9_1
SUSE Linux Enterprise Module for Server Applications 15 SP3postgresql-jdbc42.2.25-150300.3.8.1
SUSE Linux Enterprise Module for Server Applications 15 SP4postgresql-jdbc42.2.25-150400.3.6.1
SUSE Linux Enterprise Server 12 SP2-BCLpostgresql-jdbc9.4-3.6.3
SUSE Linux Enterprise Server 12 SP3-BCLpostgresql-jdbc9.4-3.6.3
SUSE Linux Enterprise Server 12 SP4-LTSSpostgresql-jdbc9.4-3.6.3
SUSE Linux Enterprise Server 12 SP5postgresql-jdbc9.4-3.6.3
SUSE Linux Enterprise Server for SAP Applications 12 SP4postgresql-jdbc9.4-3.6.3
SUSE Linux Enterprise Server for SAP Applications 12 SP5postgresql-jdbc9.4-3.6.3
SUSE Manager Server Module 4.1postgresql-jdbc42.2.10-150200.3.11.1
SUSE Manager Server Module 4.2postgresql-jdbc42.2.25-150300.3.8.1
SUSE OpenStack Cloud 9postgresql-jdbc9.4-3.6.3
SUSE OpenStack Cloud Crowbar 9postgresql-jdbc9.4-3.6.3
Ubuntu 14.04 LTSlibpgjavano fix
Ubuntu 16.04 LTSlibpgjavano fix
Ubuntu 22.04 LTSlibpgjavano fix
Ubuntu 24.04 LTSlibpgjavano fix
Ubuntu 25.10libpgjavano fix
Ubuntu 26.04 LTSlibpgjavano fix
Ubuntu 26.10libpgjavano fix
Ubuntu Pro 18.04 LTSlibpgjavano fix
Ubuntu Pro 20.04 LTSlibpgjavano fix
Wolfimariadb-10.1110.11.8-r2
Wolfimariadb-10.11-backup10.11.8-r2
Wolfimariadb-10.11-bench10.11.8-r2
Wolfimariadb-10.11-client10.11.8-r2
Wolfimariadb-10.11-dev10.11.8-r2
Wolfimariadb-10.11-doc10.11.8-r2
Wolfimariadb-10.11-embedded10.11.8-r2
Wolfimariadb-10.11-oci-entrypoint10.11.8-r2
Wolfimariadb-10.610.6.18-r2
Wolfimariadb-10.6-backup10.6.18-r2
Wolfimariadb-10.6-bench10.6.18-r2
Wolfimariadb-10.6-dev10.6.18-r2
Wolfimariadb-10.6-doc10.6.18-r2
Wolfimariadb-10.6-embedded10.6.18-r2
Wolfimariadb-10.6-oci-entrypoint10.6.18-r2
Wolfimariadb-10.6-test10.6.18-r2
Wolfimariadb-11.211.2.3-r2
Wolfimariadb-11.2-backup11.2.3-r2
Wolfimariadb-11.2-bench11.2.3-r2
Wolfimariadb-11.2-client11.2.3-r2
Wolfimariadb-11.2-dev11.2.3-r2
Wolfimariadb-11.2-doc11.2.3-r2
Wolfimariadb-11.2-embedded11.2.3-r2
Wolfimariadb-11.2-oci-entrypoint11.2.3-r2
openSUSE Leap 15.3postgresql-jdbc42.2.25-150300.3.8.1
openSUSE Leap 15.4postgresql-jdbc42.2.25-150400.3.6.1