> CVE-2022-31197 [HIGH]

« BACK_TO_HOME
PUBLISHED
2022-08-03 19:15
MODIFIED
2024-11-21 07:04
CVSS_SCORE V3
7.1
EPSS (Prob. Exploit)
2.36%
Top 16.0%
DATA SOURCES:
NVD 🔗 2025-10-18 CVE PROJECT 🔗 2026-01-19 FIRST EPSS 🔗 2026-11-15 GITHUB 🔗 2026-11-17

> DESCRIPTION

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.

> AFFECTED_PRODUCTS

Debian - Debian Linux
Version: 10.0
Fedoraproject - Fedora
Version: 35
Fedoraproject - Fedora
Version: 36
PostgreSQL - Postgresql Jdbc Driver
< 42.2.26
PostgreSQL - Postgresql Jdbc Driver
>= 42.3.0 < 42.3.7
PostgreSQL - Postgresql Jdbc Driver
Version: 42.4.0
PostgreSQL - Postgresql Jdbc Driver
Version: 42.4.1

> CVSS V3 METRICS

CVSS_VECTOR
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

> MÉTRIQUES CVSS DÉTAILLÉES

CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Métrique Valeur Interprétation
AV (Vecteur d'Attaque)
Attack Vector
Network (N)
Exploit possible à distance via réseau (HTTP, API, etc.)
AC (Complexité d'Attaque)
Attack Complexity
High (H)
Conditions spécifiques doivent être réunies pour exploiter
PR (Privilèges Requis)
Privileges Required
Low (L)
Authentifié avec compte utilisateur basique
UI (Interaction Utilisateur)
User Interaction
Required (R)
Nécessite une action utilisateur (clic lien, ouverture fichier, etc.)
S (Périmètre)
Scope
Unchanged (U)
Impact reste dans le périmètre du composant compromis
C (Impact Confidentialité)
Confidentiality Impact
High (H)
Divulgation totale d'informations
I (Impact Intégrité)
Integrity Impact
High (H)
Modification totale des données possible
A (Impact Disponibilité)
Availability Impact
High (H)
Interruption totale du service possible

> RÉSUMÉ DES IMPACTS

Confidentialité
High
Divulgation totale d'informations
Intégrité
High
Modification totale des données possible
Disponibilité
High
Interruption totale du service possible

> GITHUB SECURITY ADVISORY

GHSA-r38f-c4h4-hqq2 HIGH

PostgreSQL JDBC Driver SQL Injection in ResultSet.refreshRow() with malicious column names

AFFECTED PACKAGES:
MAVEN / org.postgresql:postgresql
>= 42.3.0, < 42.3.7
Fixed in: 42.3.7
MAVEN / org.postgresql:postgresql
>= 42.4.0, < 42.4.1
Fixed in: 42.4.1
MAVEN / org.postgresql:postgresql
< 42.2.26
Fixed in: 42.2.26

> HISTORIQUE DES MODIFICATIONS

Première apparition
03/08/2022 19:15
Source: NVD
📊 ENRICHISSEMENT 18/10/2025 14:34
CVEPROJECT
Champ modifié: CVE Project
Ancienne valeur:
Non
Nouvelle valeur:
Oui
Total des modifications: 1 Dernière mise à jour: 1 year ago
« BACK_TO_HOME