Code execution via unchecked plugin class instantiation
Published Feb 2, 2022 · Updated May 5, 2025
Code execution in pgjdbc 9.4.1208 through 42.2.24 and 42.3.0 through 42.3.1 allows local users to load arbitrary classes via connection properties. The ObjectFactory.instantiate method passed attacker-selected class names to Class.forName and invoked constructors without verifying the expected plugin interface. Control of a JDBC URL or its connection properties is required, and successful exploitation runs code with the Java application's privileges.
Summary
What happened
Code execution in pgjdbc 9.4.1208 through 42.2.24 and 42.3.0 through 42.3.1 allows local users to load arbitrary classes via connection properties. The ObjectFactory.instantiate method passed attacker-selected class names to Class.forName and invoked constructors without verifying the expected plugin interface. Control of a JDBC URL or its connection properties is required, and successful exploitation runs code with the Java application's privileges.
The record
- CVE
- CVE-2022-21724
- Published
- Feb 2, 2022
- Updated
- May 5, 2025
- Vendor
- Unknown vendor
- Product
- Unknown product
- Classifications
- T1203
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Feb 2, 2022CVE publishedPublication date reported by the CVE source.
- May 5, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
What conditions does exploitation require?
What is affected?
Affected products and versions are unavailable in this record.
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Spring ClassPathXmlApplicationContext JDBC URL exampleproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo