CVE-2022-21724Postgresql Jdbc Driver
Critical 9.8 No auth needed
Follow: this CVE · Postgresql · Postgresql Jdbc Driver We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 3.1% probability of exploitation in 30 days · percentile 89
- Auth required
- No
- Published
- Feb 2, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-665
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Postgresql Jdbc Driver.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Maven | org.postgresql:postgresql |
≥ 9.4.1208 < 42.2.25 |
42.2.25 |
— |
| Maven | org.postgresql:postgresql |
≥ 42.3.0 < 42.3.2 |
42.3.2 |
— |
Per OSV / GitHub Advisories (GHSA-v7wg-cpwc-24m4). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| postgresql | postgresql_jdbc_driver | < 42.2.25 |
| postgresql | postgresql_jdbc_driver | ≥ 42.3.0 < 42.3.2 |
| postgresql | postgresql_jdbc_driver | 42.3.2 |
| fedoraproject | fedora | 35 |
| quarkus | quarkus | < 2.7.2 |
| debian | debian_linux | 9.0 |
| debian | debian_linux | 10.0 |
| debian | debian_linux | 11.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Exploit Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.fedoraproject.org
- security.netapp.com Third Party Advisory
- www.debian.org Third Party Advisory