VDB

CVE-2022-21724

CVE-2022-21724 PUBLISHED CVSS 7 HIGH

Unchecked Class Instantiation when providing Plugin Classes

Reported by github_m · Published February 2, 2022

postgresql is fixed in 42.3.2 and 42.2.25 (Maven Central)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
org.postgresql:postgresqlMaven Central42.3.2, 42.2.25
mariadb-10.6Chainguard10.6.18-r2
mariadb-11.2Wolfi11.2.3-r2
mariadb-10.11Chainguard10.11.8-r2
mariadb-10.11Wolfi10.11.8-r2
mariadb-11.2Chainguard11.2.3-r2
quarkusquarkus2.7.2

Risk scores

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

Affected products

VendorProductVersions
n/an/an/a
chainguardmariadb-10.60
Mavenorg.postgresql:postgresql9.4.1208, 42.3.0
wolfimariadb-11.20
chainguardmariadb-10.110
wolfimariadb-10.110
chainguardmariadb-11.20
n/an/a*
alpinejava-postgresql-jdbc0
wolfimariadb-10.60

Timeline

  • Feb 1, 2022 CVE Published
  • Feb 2, 2022 CVE Updated
  • Feb 8, 2022 EPSS Score (30 in total, the first dated here)
  • Apr 22, 2022 PoC Published (84 in total, the first dated here)
  • Mar 31, 2026 Distribution Patch (28 in total, the first dated here)
  • Mar 31, 2026 Security Advisory (30 in total, the first dated here)
  • Jul 7, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-21724
vulnetix vdb fixes CVE-2022-21724

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-21724/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›