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

- Severity: High 7.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.20%, higher than 88% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-02-02T00:04:20.000Z
- Modified: 2026-09-10T03:49:12.996Z
- Also known as: GHSA-v7wg-cpwc-24m4, BIT-POSTGRESQL-JDBC-DRIVER-2022-21724
- Weaknesses: CWE-74, CWE-665, CWE-668
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- org.postgresql:postgresql (Maven): from 9.4.1208 before 42.2.25; from 42.3.0 before 42.3.2
- postgresql postgresql_jdbc_driver: before 42.2.25; from 42.3.0 before 42.3.2; 42.3.2
- fedoraproject fedora: 35
- quarkus quarkus: before 2.7.2
- debian debian_linux: 9.0; 10.0; 11.0
- postgresql-jdbc-driver (Bitnami): before 42.2.25; from 42.3.0 before 42.3.2

## Every score

- GitHub_M: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-v7wg-cpwc-24m4> (exploit, advisory, third-party-advisory, web)
- <https://github.com/pgjdbc/pgjdbc/commit/f4d0ed69c0b3aae8531d83d6af4c57f22312c813> (advisory, patch, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20220311-0005/> (advisory, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BVEO7BEFXPBVHSPYL3YKQWZI6DYXQLFS/> (vendor-advisory, web)
- <https://lists.debian.org/debian-lts-announce/2022/05/msg00027.html> (advisory, mailing-list, third-party-advisory, web)
- <https://www.debian.org/security/2022/dsa-5196> (advisory, third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-21724> (advisory, web)
- <https://github.com/pgjdbc/pgjdbc> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BVEO7BEFXPBVHSPYL3YKQWZI6DYXQLFS> (web)
- <https://security.netapp.com/advisory/ntap-20220311-0005> (web)

## Sources

- CVE List: [CVE-2022-21724](https://www.cve.org/CVERecord?id=CVE-2022-21724), CVE Terms of Use, modified 2025-05-05
- GitHub Advisory Database: [GHSA-v7wg-cpwc-24m4](https://github.com/advisories/GHSA-v7wg-cpwc-24m4), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2022-21724](https://nvd.nist.gov/vuln/detail/CVE-2022-21724), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-POSTGRESQL-JDBC-DRIVER-2022-21724](https://osv.dev/vulnerability/BIT-POSTGRESQL-JDBC-DRIVER-2022-21724), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-21724 · Whole record: https://cve.day/CVE-2022-21724.json · Rebuilt by cve.day 2026-11-25T22:58:09.463Z
