Skip to main content
Public proof of conceptFix available

CVE-2022-21724

A public proof of concept exists; no exploitation attested.

  • Published2022-02-02
  • Fixed in42.3.2 · 42.2.25
  • WeaknessCWE-665

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2022-02-0212:15CVE publishedNVD

Versions per branch

NVD · OSV
Postgresql postgresql jdbc driver
BranchAffectedFixed in
42.3≥ 42.3.0, < 42.3.242.3.2
42.2< 42.2.2542.2.25
42.2≥ 9.4.1208, < 42.2.2542.2.25
42.3= 42.3.2no fix published
Debian debian linux
BranchAffectedFixed in
9.0= 9.0no fix published
10.0= 10.0no fix published
11.0= 11.0no fix published
Fedoraproject fedora
BranchAffectedFixed in
35.x= 35no fix published

1 more product in the sources.

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • apache-hiveCleanStartall versions · fixed in 3.1.3-r3
  • golang-github-lusitaniae-apache_exporterSUSE:Manager Server Module 4.1all versions · fixed in 0.7.0-150200.2.6.2
  • golang-github-prometheus-node_exporterSUSE:Manager Server Module 4.1all versions · fixed in 1.3.0-150200.3.9.3
  • golang-github-QubitProducts-exporter_exporterSUSE:Manager Server Module 4.1all versions · fixed in 0.4.0-150200.6.12.2
  • java-postgresql-jdbcCleanStartall versions · fixed in 42.2.25-r0
  • java-postgresql-jdbcAlpine:v3.25all versions · fixed in 42.2.25-r0
  • java-postgresql-jdbcAlpine:v3.24all versions · fixed in 42.2.25-r0
  • java-postgresql-jdbcAlpine:v3.23all versions · fixed in 42.2.25-r0

54 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-21724 Red Hat Product Security4 products fixed · 11 known affected

    jdbc-postgresql: Unchecked Class Instantiation when providing Plugin Classes

    postgresql-jdbc as a component of Red Hat Enterprise Linux 6 · postgresql-jdbc.src as a component of Red Hat Enterprise Linux 6 · postgresql-jdbc as a component of Red Hat Enterprise Linux 7 · +8 more

  • RHSA-2022:6835 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Service Registry (container images) release and security update [2.3.0.GA]

  • RHSA-2022:6813 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat Process Automation Manager 7.13.1 security update

  • RHSA-2022:5532 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat Fuse 7.11.0 release and security update

  • RHSA-2022:4623 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat build of Quarkus 2.7.5 release and security update

Full record on NVD

Fix

  1. Update Postgresql postgresql jdbc driver to 42.3.2 · 42.2.25
  2. Vendor fix Red Hat Product Security RHSA-2022:6835 · 1 productBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  3. Vendor fix Red Hat Product Security RHSA-2022:6813 · 1 productFor on-premise installations, before applying the update, back up your existing installation, including all applications, configuration files, databases and database settings, and so on. Red Hat recommends that you halt the server by stopping the JBoss Application Server process before installing …
  4. Vendor fix Red Hat Product Security RHSA-2022:5532 · 1 productBefore applying the update, back up your existing installation, including all applications, configuration files, databases and database settings, and so on. Installation instructions are available from the Fuse 7.11.0 product documentation page: https://access.redhat.com/documentation/en-us/red_ha…
  5. Vendor fix Red Hat Product Security RHSA-2022:4623 · 1 productBefore applying the update, back up your existing installation, including all applications, configuration files, databases and database settings, and so on. The References section of this erratum contains a download link for the update. You must be logged in to download the update.
  6. No fix available, says the vendor Red Hat Product Security CVE-2022-21724 · 2 productsAffected
  7. No fix planned, says the vendor Red Hat Product Security CVE-2022-21724 · 2 productsOut of support scope

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2025-04-25
  • CNACVSS 3.17known since 2026-10-23
  • NVDCVSS 3.19.8read 2026-10-23
  • NVDCVSS 2.07.5read 2026-10-23
  • CISA-ADPweakness (CWE)CWE-6652025-05-05
  • NVDweakness (CWE)CWE-665read 2026-10-23
  • FIRST EPSSEPSS score3.2 %2026-12-04
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHigh2022-02-01

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2022-02-02
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-v7wg-cpwc-24m4

Frequently asked questions

What is CVE-2022-21724?

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.

Is CVE-2022-21724 actively exploited?

A proof-of-concept exploit exists for CVE-2022-21724, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2022-21724?

CVE-2022-21724 has a CVSS v3 base score of 9.8 (Critical severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running PostgreSQL? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record