CVE-2022-21724
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| org.postgresql:postgresql | Maven Central | 42.3.2, 42.2.25 |
| mariadb-10.6 | Chainguard | 10.6.18-r2 |
| mariadb-11.2 | Wolfi | 11.2.3-r2 |
| mariadb-10.11 | Chainguard | 10.11.8-r2 |
| mariadb-10.11 | Wolfi | 10.11.8-r2 |
| mariadb-11.2 | Chainguard | 11.2.3-r2 |
| quarkus | quarkus | 2.7.2 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| chainguard | mariadb-10.6 | 0 |
| Maven | org.postgresql:postgresql | 9.4.1208, 42.3.0 |
| wolfi | mariadb-11.2 | 0 |
| chainguard | mariadb-10.11 | 0 |
| wolfi | mariadb-10.11 | 0 |
| chainguard | mariadb-11.2 | 0 |
| n/a | n/a | * |
| alpine | java-postgresql-jdbc | 0 |
| wolfi | mariadb-10.6 | 0 |
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
- x_refsource_CONFIRM
- x_refsource_MISC
- x_refsource_CONFIRM
- FEDORA-2022-1151f65e9a vendor-advisoryx_refsource_FEDORA
- [debian-lts-announce] 20220520 [SECURITY] [DLA 3018-1] libpgjava security update mailing-listx_refsource_MLIST
- DSA-5196 vendor-advisoryx_refsource_DEBIAN
- https://github.com/advisories/GHSA-v7wg-cpwc-24m4 advisory