Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
☕
☕ Maven
Not in CISA KEV
HIGH severity

CVE-2022-21724 — postgresql

HIGHFix: pgjdbc/pgjdbc@f4d0ed6

CVE-2022-21724 is a high-severity (CVSS 7) CWE-665 vulnerability in org.postgresql:postgresql. 1 public exploit reference exists, so weaponization risk is real. A fix is available for org.postgresql:postgresql — see the affected versions and patch details below.

Unchecked Class Instantiation when providing Plugin Classes

Also known asBIT-postgresql-jdbc-driver-2022-21724GHSA-v7wg-cpwc-24m4
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
1 known
Exploitation data as of Oct 11, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2022-21724.

EPSS Exploitation Probability

via FIRST.org ↗
3.1%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs87th percentile — riskier than 87% of all scored CVEsHighest risk
2.29%3.57%4.85%6.13%4.8%3.1%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2022-21724 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

2 pkgs affected
☕org.postgresql:postgresql☕org.postgresql:postgresql

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

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.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
☕Mavenorg.postgresql:postgresql≥ 9.4.1208&&< 42.2.2542.2.25org.postgresql:postgresql:42.2.25
☕Mavenorg.postgresql:postgresql≥ 42.3.0&&< 42.3.242.3.2org.postgresql:postgresql:42.3.2

Affected Products

4 products · 8 configurations
OS
debian linuxdebian
3 versions
9.010.011.0
OS
fedorafedoraproject
1 version
35
Application
postgresql jdbc driverpostgresql
≥ 42.3.0 && < 42.3.2
1 version
42.3.2
Application
quarkusquarkus
< 2.7.2
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.postgresql:postgresql, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update org.postgresql:postgresql to 42.2.25 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-21724 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

According to the patch upstream the scoring of this issue has been severely reduced and is no longer considered an RCE. Therefore, the flaw has been rated as having a security impact of Moderate, and is not currently planned to be addressed in future updates of Red Hat Enterprise Linux 6, 7 and 8.

ProductFixed inAdvisory
Red Hat build of Quarkus 2.7.5postgresqlRHSA-2022:4623
Red Hat Fuse 7.11jdbc-postgresqlRHSA-2022:5532
RHINT Service Registry 2.3.0 GAquarkus-jdbc-postgresql-deploymentRHSA-2022:6835
RHPAM 7.13.1 asyncjdbc-postgresqlRHSA-2022:6813

Frequently Asked Questions

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 executio
O3 Security · Impact-Aware SCA

Is CVE-2022-21724 in your dependencies?

Find it across Maven, including transitive dependencies.

CVE-2022-21724: postgresql — Fixed in 42.2.25