Vulnerabilities / CVE-2022-21724

critical

CVE-2022-21724

jdbc-postgresql: Unchecked Class Instantiation when providing Plugin Classes

Published Modified CWE 665
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA7.0CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Red Hat7.0CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Bitnami9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, Bitnami. Rated lower by GHSA (high), Red Hat (medium).

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 and fixed versions

SourcePackageFixed in
bitnami::Bitnami Vulnerability Databasepostgresql-jdbc-driver42.2.25, 42.3.2
alpine 3.16java-postgresql-jdbc42.2.25-r0
alpine 3.17java-postgresql-jdbc42.2.25-r0
alpine 3.18java-postgresql-jdbc42.2.25-r0
alpine 3.19java-postgresql-jdbc42.2.25-r0
alpine 3.20java-postgresql-jdbc42.2.25-r0
alpine 3.21java-postgresql-jdbc42.2.25-r0
alpine 3.22java-postgresql-jdbc42.2.25-r0
alpine 3.23java-postgresql-jdbc42.2.25-r0
alpine 3.24java-postgresql-jdbc42.2.25-r0
alpine edgejava-postgresql-jdbc42.2.25-r0
chainguardmariadb-10.11, mariadb-10.6, mariadb-11.210.11.8-r2 and 2 more
Show all 30 entries from 23 sources
SourcePackageFixed in
bitnami::Bitnami Vulnerability Databasepostgresql-jdbc-driver42.2.25, 42.3.2
alpine 3.16java-postgresql-jdbc42.2.25-r0
alpine 3.17java-postgresql-jdbc42.2.25-r0
alpine 3.18java-postgresql-jdbc42.2.25-r0
alpine 3.19java-postgresql-jdbc42.2.25-r0
alpine 3.20java-postgresql-jdbc42.2.25-r0
alpine 3.21java-postgresql-jdbc42.2.25-r0
alpine 3.22java-postgresql-jdbc42.2.25-r0
alpine 3.23java-postgresql-jdbc42.2.25-r0
alpine 3.24java-postgresql-jdbc42.2.25-r0
alpine edgejava-postgresql-jdbc42.2.25-r0
chainguardmariadb-10.1110.11.8-r2
chainguardmariadb-10.610.6.18-r2
chainguardmariadb-11.211.2.3-r2
debian 10libpgjava42.2.5-2+deb10u1
debian 11libpgjava42.2.15-1+deb11u1
debian 12libpgjava42.3.2-1
debian 13libpgjava42.3.2-1
debian 14libpgjava42.3.2-1
debian 9libpgjava9.4.1212-1+deb9u1
echolibpgjava42.3.2-1
maven::GitHub Security Advisory Mavenorg.postgresql:postgresql42.2.25, 42.3.2
minimosmariadb-10.1110.11.11-r1
minimosmariadb-10.510.5.28-r1
minimosmariadb-10.610.6.21-r1
Red Hatpostgresql-jdbcno fix listed
Red Hatpostgresql-jdbc-javadocno fix listed
wolfimariadb-10.1110.11.8-r2
wolfimariadb-10.610.6.18-r2
wolfimariadb-11.211.2.3-r2

References

All 13 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.