Bug 2050863 (CVE-2022-21724) - CVE-2022-21724 jdbc-postgresql: Unchecked Class Instantiation when providing Plugin Classes
Summary: CVE-2022-21724 jdbc-postgresql: Unchecked Class Instantiation when providing ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2022-21724
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2050864 2061280 2061281 2061282 2096295
Blocks: 2050865
TreeView+ depends on / blocked
 
Reported: 2022-02-04 19:40 UTC by Guilherme de Almeida Suckevicz
Modified: 2024-02-06 04:37 UTC (History)
58 users (show)

Fixed In Version: postgresql 42.2.25, postgresql 42.3.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-18 14:35:30 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:4623 0 None None None 2022-05-18 10:56:41 UTC
Red Hat Product Errata RHSA-2022:5532 0 None None None 2022-07-07 14:22:29 UTC
Red Hat Product Errata RHSA-2022:6813 0 None None None 2022-10-05 10:45:35 UTC
Red Hat Product Errata RHSA-2022:6835 0 None None None 2022-10-06 12:28:03 UTC

Description Guilherme de Almeida Suckevicz 2022-02-04 19:40:12 UTC
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 remote code execution loaded via arbitrary classes. Users using plugins are advised to upgrade. There are no known workarounds for this issue.

Reference:
https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-v7wg-cpwc-24m4

Upstream patch:
https://github.com/pgjdbc/pgjdbc/commit/f4d0ed69c0b3aae8531d83d6af4c57f22312c813

Comment 1 Guilherme de Almeida Suckevicz 2022-02-04 19:40:31 UTC
Created postgresql-jdbc tracking bugs for this issue:

Affects: fedora-all [bug 2050864]

Comment 15 errata-xmlrpc 2022-05-18 10:56:38 UTC
This issue has been addressed in the following products:

  Red Hat build of Quarkus 2.7.5

Via RHSA-2022:4623 https://access.redhat.com/errata/RHSA-2022:4623

Comment 16 Product Security DevOps Team 2022-05-18 14:35:27 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-21724

Comment 23 errata-xmlrpc 2022-07-07 14:22:24 UTC
This issue has been addressed in the following products:

  Red Hat Fuse 7.11

Via RHSA-2022:5532 https://access.redhat.com/errata/RHSA-2022:5532

Comment 24 errata-xmlrpc 2022-10-05 10:45:29 UTC
This issue has been addressed in the following products:

  RHPAM 7.13.1 async

Via RHSA-2022:6813 https://access.redhat.com/errata/RHSA-2022:6813

Comment 25 errata-xmlrpc 2022-10-06 12:27:58 UTC
This issue has been addressed in the following products:

  RHINT Service Registry 2.3.0 GA

Via RHSA-2022:6835 https://access.redhat.com/errata/RHSA-2022:6835


Note You need to log in before you can comment on or make changes to this bug.