Bug 2064007 (CVE-2022-26520)

Summary: CVE-2022-26520 postgresql-jdbc: Arbitrary File Write Vulnerability
Product: [Other] Security Response Reporter: Patrick Del Bello <pdelbell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aileenc, alazarot, anstephe, avibelli, bgeorges, chazlett, clement.escoffier, dandread, databases-maint, dkreling, drieden, emingora, eric.wittmann, etirelli, fjanus, gmalinko, gmorling, gsmet, hamadhan, hbraun, hhorak, ibek, janstey, jjanco, jnethert, jochrist, jpechane, jrokos, jschatte, jstastny, jwon, krathod, kverlaen, lthon, mkulik, mnovotny, mszynkie, odubaj, pantinor, pdelbell, peholase, pgallagh, pjindal, pkubat, praiskup, probinso, rareddy, rguimara, rrajasek, rruss, rsvoboda, saroy, sbiarozk, sbonazzo, sdouglas, tgl, tzimanyi, zmiklank
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Postgres JDBC. This flaw allows an attacker to use a method to write arbitrary files through the connection properties settings. For example, an attacker can create an executable file under the server the application is running and make it a new part of the application or server.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-07 20:24:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2068614, 2073360, 2073361, 2073362, 2073363, 2073367, 2073368    
Bug Blocks: 2064008    

Description Patrick Del Bello 2022-03-14 21:17:45 UTC
In pgjdbc before 42.3.3, an attacker (who controls the jdbc URL or properties) can call java.util.logging.FileHandler to write to arbitrary files through the loggerFile and loggerLevel connection properties. An example situation is that an attacker could create an executable JSP file under a Tomcat web root. NOTE: the vendor's position is that there is no pgjdbc vulnerability; instead, it is a vulnerability for any application to use the pgjdbc driver with untrusted connection properties.

https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-673j-qm5f-xpv8
https://jdbc.postgresql.org/documentation/changelog.html#version_42.3.3
https://github.com/pgjdbc/pgjdbc/pull/2454/commits/017b929977b4f85795f9ad2fa5de6e80978b8ccc
https://jdbc.postgresql.org/documentation/head/tomcat.html

Comment 1 Patrick Del Bello 2022-03-25 19:31:08 UTC
Created postgresql-jdbc tracking bugs for this issue:

Affects: fedora-all [bug 2068614]

Comment 10 errata-xmlrpc 2022-07-07 14:22:43 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 11 Product Security DevOps Team 2022-07-07 20:24:06 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-26520

Comment 12 errata-xmlrpc 2022-10-05 10:45:39 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 13 errata-xmlrpc 2022-10-06 12:27:35 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