Vulnerability · Published Feb 2, 2022 · Assigned by GitHub_M

CVE-2022-21724Unchecked Class Instantiation when providing Plugin Classes

High 7.0

In plain English

A high-severity security flaw in the java-postgresql-jdbc package (Alpine). Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 3.1% (higher than 88% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.0High
Exploit odds (30 days)3.1%top 12.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20java-postgresql-jdbc42.2.25-r0ALPINE-CVE-2022-21724
Alpine:v3.21java-postgresql-jdbc42.2.25-r0ALPINE-CVE-2022-21724
Alpine:v3.22java-postgresql-jdbc42.2.25-r0ALPINE-CVE-2022-21724
Alpine:v3.23java-postgresql-jdbc42.2.25-r0ALPINE-CVE-2022-21724
Alpine:v3.24java-postgresql-jdbc42.2.25-r0ALPINE-CVE-2022-21724
Debian:12libpgjava42.3.2-1DEBIAN-CVE-2022-21724
Debian:13libpgjava42.3.2-1DEBIAN-CVE-2022-21724
Debian:14libpgjava42.3.2-1DEBIAN-CVE-2022-21724
Mavenorg.postgresql:postgresql42.3.2GHSA-v7wg-cpwc-24m4
Mavenorg.postgresql:postgresql42.2.25GHSA-v7wg-cpwc-24m4

Affected products (as reported)

VendorProductVersions
n/a n/a n/a

Weakness: CWE-665 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

References