CVE-2022-21724
CRITICAL 9.8CVSS 3.1pgjdbc Does Not Check Class Instantiation when providing Plugin Classes
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.
- Published
- 2 Feb 2022
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-665CWE-668CWE-74
- Also known as
- BIT-postgresql-jdbc-driver-2022-21724GHSA-v7wg-cpwc-24m4
- Sources
- NVDJSONOSV GHSA-v7wg-cpwc-24m4JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | postgresql | postgresql_jdbc_drivercpe:2.3:a:postgresql:postgresql_jdbc_driver:*:*:*:*:*:*:*:* |
< 42.2.25 | 42.2.25 |
| NVD | postgresql | postgresql_jdbc_drivercpe:2.3:a:postgresql:postgresql_jdbc_driver:*:*:*:*:*:*:*:* |
>= 42.3.0, < 42.3.2 | 42.3.2 |
| NVD | postgresql | postgresql_jdbc_drivercpe:2.3:a:postgresql:postgresql_jdbc_driver:42.3.2:rc1:*:*:*:*:*:* |
= 42.3.2 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* |
= 35 | |
| NVD | quarkus | quarkuscpe:2.3:a:quarkus:quarkus:*:*:*:*:*:*:*:* |
< 2.7.2 | 2.7.2 |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* |
= 11.0 | |
| OSV | Maven | org.postgresql:postgresql | >= 9.4.1208, < 42.2.25 | 42.2.25 |
| OSV | Maven | org.postgresql:postgresql | >= 42.3.0, < 42.3.2 | 42.3.2 |
References
- https://github.com/pgjdbc/pgjdbc/commit/f4d0ed69c0b3aae8531d83d6af4c57f22312c813 · Patch, Third Party Advisory, WEB
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-v7wg-cpwc-24m4 · Exploit, Third Party Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2022/05/msg00027.html · Mailing List, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BVEO7BEFXPBVHSPYL3YKQWZI6DYXQLFS/
- https://security.netapp.com/advisory/ntap-20220311-0005/ · Third Party Advisory, WEB
- https://www.debian.org/security/2022/dsa-5196 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-21724 · ADVISORY
- https://github.com/pgjdbc/pgjdbc · PACKAGE
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BVEO7BEFXPBVHSPYL3YKQWZI6DYXQLFS · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 2 Feb 2022)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 2 Feb 2022)