Live threats

All CVEs / Postgresql

CVE-2022-21724Postgresql Jdbc Driver

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
3.1%
probability of exploitation in 30 days · percentile 89
Auth required
No
Published
Feb 2, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-665
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

pgjdbc is the offical PostgreSQL JDBC Driver. A security hole was found in the jdbc driver for postgresql database while doing security research. The system using the postgresql library will be attacked when attacker control the jdbc url or properties. pgjdbc instantiates plugin instances based on class names provided via `authenticationPluginClassName`, `sslhostnameverifier`, `socketFactory`, `sslfactory`, `sslpasswordcallback` connection properties. However, the driver did not verify if the class implements the expected interface before instantiating the class. This can lead to code execution loaded via arbitrary classes. Users using plugins are advised to upgrade. There are no known workarounds for this issue.

Original NVD text.

What to do

  1. Apply the vendor's security update for Postgresql Jdbc Driver.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Maven org.postgresql:postgresql ≥ 9.4.1208 < 42.2.25 42.2.25 —
Maven org.postgresql:postgresql ≥ 42.3.0 < 42.3.2 42.3.2 —

Per OSV / GitHub Advisories (GHSA-v7wg-cpwc-24m4). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
postgresqlpostgresql_jdbc_driver< 42.2.25
postgresqlpostgresql_jdbc_driver≥ 42.3.0 < 42.3.2
postgresqlpostgresql_jdbc_driver42.3.2
fedoraprojectfedora35
quarkusquarkus< 2.7.2
debiandebian_linux9.0
debiandebian_linux10.0
debiandebian_linux11.0

Official sources

References

Links published by the sources. Open them with care.