Skip to content
Fencer Vulns
high 7.0

CVE-2022-21724 json

Unchecked Class Instantiation when providing Plugin Classes

published 2022-02-02 4 y ago modified 2026-09-10 1 mo ago also BIT-postgresql-jdbc-driver-2022-21724 , EUVD-2022-1192 , GHSA-v7wg-cpwc-24m4

cvss
7.0
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
3.1%
EPSS 3.1% chance of exploitation in 30 days, percentile 87%
public exploits
0
none known

Summary

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.

Patch / fix

  • maven org.postgresql:postgresql 42.2.25, 42.3.2
  • bitnami postgresql-jdbc-driver 42.2.25, 42.3.2
  • postgresql postgresql_jdbc_driver 42.2.25, 42.3.2
  • quarkus quarkus 2.7.2
  • libpgjava Debian 14, Debian 13, Debian 12 42.3.2-1

debian advisories DEBIAN-CVE-2022-21724

  • spacecmd Manager Server Module 4.1 4.1.18-150200.4.39.3
  • susemanager Manager Server Module 4.1 4.1.36-150200.3.52.1
  • spacewalk-web Manager Server Module 4.1 4.1.34-150200.3.47.6
  • spacewalk-java Manager Server Module 4.1 4.1.46-150200.3.71.5
  • postgresql-jdbc Manager Server Module 4.1 42.2.10-150200.3.8.2
  • spacewalk-setup Manager Server Module 4.1 4.1.11-150200.3.18.2
  • spacewalk-utils Manager Server Module 4.1 4.1.20-150200.3.30.2
  • susemanager-sls Manager Server Module 4.1 4.1.36-150200.3.64.2

suse advisories SUSE-SU-2022:2145-1SUSE-SU-2022:2143-1

  • java-postgresql-jdbc Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 42.2.25-r0

alpine advisories ALPINE-CVE-2022-21724

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-21724 updated cvss 7.0

jdbc-postgresql: Unchecked Class Instantiation when providing Plugin Classes

  • Red Hat Enterprise Linux 6 postgresql-jdbc
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 7 postgresql-jdbc, postgresql-jdbc-javadoc Red Hat Enterprise Linux 8 postgresql-jdbc, postgresql-jdbc-javadoc
    affected: no fix planned “Will not fix”
  • Red Hat Integration Camel K 1 quarkus-jdbc-postgresql-deployment
    affected: no fix available
  • Red Hat Integration Camel Quarkus 1 quarkus-jdbc-postgresql-deployment
    affected: no fix planned “Will not fix”
  • Red Hat Integration Service Registry quarkus-jdbc-postgresql-deployment
    affected: no fix available
  • Red Hat build of Quarkus 2.7.5
    fixed: vendor fix RHSA-2022:4623
  • Red Hat Fuse 7.11
    fixed: vendor fix RHSA-2022:5532
  • Red Hat RHINT Service Registry 2.3.0 GA
    fixed: vendor fix RHSA-2022:6835
show 2 more
  • Red Hat RHPAM 7.13.1 async
    fixed: vendor fix RHSA-2022:6813
  • Red Hat Enterprise Linux 8 autocorr-af, autocorr-bg, autocorr-ca, autocorr-cs, autocorr-da, autocorr-de, +98 more Red Hat Enterprise Linux 9 postgresql-jdbc
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
total
Assessed
18 mo ago

Exploit prediction

3.09% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-v7wg-cpwc-24m4 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 7.0 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 7.0 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P
OSV 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
maven org.postgresql:postgresql
>=9.4.1208, <42.2.25
>=42.3.0, <42.3.2
42.2.25
42.3.2
bitnami postgresql-jdbc-driver
<42.2.25
>=42.3.0, <42.3.2
42.2.25
42.3.2

Classification

Weakness
  • CWE-665 Improper Initialization
  • CWE-668 Exposure of Resource to Wrong Sphere
  • CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.