Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2022-21724: n/a in n/a

0
High
VulnerabilityCVE-2022-21724cvecve-2022-21724
Published: Wed Feb 02 2022 (02/02/2022, 11:48:52 UTC)
Source: CVE
Vendor/Project: n/a
Product: n/a

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.

AI-Powered Analysis

AILast updated: 07/05/2025, 21:43:17 UTC

Technical Analysis

CVE-2022-21724 is a high-severity vulnerability found in the PostgreSQL JDBC driver (pgjdbc), which is the official Java Database Connectivity driver for PostgreSQL databases. The vulnerability arises from the way the driver handles certain connection properties that specify plugin class names, such as `authenticationPluginClassName`, `sslhostnameverifier`, `socketFactory`, `sslfactory`, and `sslpasswordcallback`. When these properties are set, the driver instantiates plugin classes based on the provided class names without verifying whether the classes implement the expected interfaces. This lack of validation allows an attacker who can control the JDBC URL or connection properties to specify arbitrary class names, potentially leading to the instantiation and execution of malicious code. This results in a remote code execution (RCE) vector within the context of the application using the driver. The vulnerability requires that the attacker have the ability to influence the JDBC connection string or properties, which typically implies some level of access or control over the application configuration or input. The CVSS v3.1 score is 7.0 (high), reflecting the significant impact on confidentiality, integrity, and availability, but with a higher attack complexity and the need for some privileges. No known exploits are currently reported in the wild, and no workarounds exist other than upgrading the driver. This vulnerability is categorized under CWE-665 (Improper Initialization), highlighting the failure to properly validate plugin classes before instantiation. Given the widespread use of PostgreSQL and its JDBC driver in enterprise Java applications, this vulnerability poses a serious risk if exploited.

Potential Impact

For European organizations, this vulnerability can have severe consequences. PostgreSQL is widely used across Europe in various sectors including finance, government, healthcare, and technology. Many enterprise Java applications rely on the pgjdbc driver for database connectivity. If an attacker can manipulate the JDBC connection properties, they could execute arbitrary code within the application environment, potentially leading to data breaches, unauthorized access, disruption of services, or lateral movement within networks. The impact on confidentiality is high as sensitive data stored in PostgreSQL databases could be exposed or altered. Integrity and availability are also at risk due to possible malicious code execution affecting database operations or application stability. Given the high reliance on PostgreSQL in critical infrastructure and business applications, exploitation could disrupt essential services and cause significant financial and reputational damage. The absence of known exploits in the wild suggests that organizations have a window to remediate before widespread attacks occur, but the lack of workarounds means patching or upgrading is imperative.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should immediately identify all applications using the PostgreSQL JDBC driver and verify the version in use. They should upgrade to the latest patched version of the pgjdbc driver as soon as it becomes available from the official PostgreSQL or pgjdbc repositories. Until an upgrade is applied, organizations should audit and restrict any external or user-controlled inputs that influence JDBC connection strings or properties, especially those that could set plugin class names. Implement strict input validation and sanitization on any configuration or runtime parameters that affect database connectivity. Additionally, employ runtime application self-protection (RASP) or application-layer firewalls to monitor and block suspicious JDBC connection attempts. Organizations should also review application logs for unusual JDBC connection strings or errors indicative of exploitation attempts. Network segmentation and least privilege principles should be enforced to limit the impact of any potential compromise. Finally, maintain up-to-date backups of critical databases and test incident response plans to prepare for potential exploitation scenarios.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2021-11-16T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d981ec4522896dcbdbea2

Added to database: 5/21/2025, 9:08:46 AM

Last enriched: 7/5/2025, 9:43:17 PM

Last updated: 2/7/2026, 4:51:40 PM

Views: 31

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats