CVE-2022-26520
Description
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
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In pgjdbc before 42.3.3, an attacker controlling JDBC connection properties can write arbitrary files via loggerFile and loggerLevel, potentially leading to RCE.
Vulnerability
In pgjdbc versions before 42.3.3, the driver accepts loggerFile and loggerLevel connection properties that are passed directly to java.util.logging.FileHandler. This allows an attacker who controls the JDBC URL or connection properties to write arbitrary files to the filesystem. The affected versions are all releases prior to 42.3.3 [2][4].
Exploitation
An attacker needs the ability to supply a full JDBC URL or connection properties (e.g., through an untrusted input field). By setting loggerFile to a writable path (such as a Tomcat web root) and loggerLevel to DEBUG, the driver creates a file with attacker-controlled content. For example, a JSP payload can be written to achieve code execution [2][4].
Impact
Successful exploitation allows arbitrary file write. In a typical web application server like Tomcat, an attacker can create an executable JSP file, leading to remote code execution with the privileges of the application server [2][4].
Mitigation
The vulnerability is fixed in pgjdbc version 42.3.3, where the loggerFile and loggerLevel properties are removed and ignored by the driver [4]. As a workaround, applications must sanitize any user-supplied JDBC URL or connection properties and never allow untrusted users to control them. The vendor considers this an application-level security issue rather than a driver defect [2].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.postgresql:postgresqlMaven | >= 42.1.0, < 42.3.3 | 42.3.3 |
Affected products
37- pgjdbc/pgjdbcdescription
- osv-coords36 versionspkg:bitnami/postgresql-jdbc-driverpkg:maven/org.postgresql/postgresqlpkg:rpm/opensuse/ongres-scram&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/ongres-stringprep&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/postgresql-jdbc&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/postgresql-jdbc&distro=openSUSE%20Leap%2015.4pkg:rpm/suse/golang-github-lusitaniae-apache_exporter&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/golang-github-prometheus-node_exporter&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/golang-github-QubitProducts-exporter_exporter&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/ongres-scram&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP3pkg:rpm/suse/ongres-scram&distro=SUSE%20Manager%20Server%20Module%204.2pkg:rpm/suse/ongres-stringprep&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP3pkg:rpm/suse/ongres-stringprep&distro=SUSE%20Manager%20Server%20Module%204.2pkg:rpm/suse/patterns-suse-manager&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/postgresql-jdbc&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP3pkg:rpm/suse/postgresql-jdbc&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP4pkg:rpm/suse/postgresql-jdbc&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/postgresql-jdbc&distro=SUSE%20Manager%20Server%20Module%204.2pkg:rpm/suse/prometheus-exporters-formula&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/prometheus-formula&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/py27-compat-salt&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/release-notes-susemanager&distro=SUSE%20Manager%20Server%204.1pkg:rpm/suse/release-notes-susemanager-proxy&distro=SUSE%20Manager%20Proxy%204.1pkg:rpm/suse/release-notes-susemanager-proxy&distro=SUSE%20Manager%20Retail%20Branch%20Server%204.1pkg:rpm/suse/spacecmd&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/spacewalk-backend&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/spacewalk-java&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/spacewalk-setup&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/spacewalk-utils&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/spacewalk-web&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/subscription-matcher&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/susemanager&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/susemanager-doc-indexes&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/susemanager-docs_en&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/susemanager-schema&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/susemanager-sls&distro=SUSE%20Manager%20Server%20Module%204.1
>= 42.1.0, < 42.1.5+ 35 more
- (no CPE)range: >= 42.1.0, < 42.1.5
- (no CPE)range: >= 42.1.0, < 42.3.3
- (no CPE)range: < 2.1-150300.3.3.4
- (no CPE)range: < 1.1-150300.7.3.4
- (no CPE)range: < 42.2.25-150300.3.5.2
- (no CPE)range: < 42.2.25-150400.3.3.2
- (no CPE)range: < 0.7.0-150200.2.6.2
- (no CPE)range: < 1.3.0-150200.3.9.3
- (no CPE)range: < 0.4.0-150200.6.12.2
- (no CPE)range: < 2.1-150300.3.3.4
- (no CPE)range: < 2.1-150300.3.3.4
- (no CPE)range: < 1.1-150300.7.3.4
- (no CPE)range: < 1.1-150300.7.3.4
- (no CPE)range: < 4.1-150200.6.12.2
- (no CPE)range: < 42.2.25-150300.3.5.2
- (no CPE)range: < 42.2.25-150400.3.3.2
- (no CPE)range: < 42.2.10-150200.3.8.2
- (no CPE)range: < 42.2.25-150300.3.5.2
- (no CPE)range: < 0.9.5-150200.3.31.2
- (no CPE)range: < 0.3.7-150200.3.21.2
- (no CPE)range: < 3000.3-150200.6.24.2
- (no CPE)range: < 4.1.15-150200.3.80.1
- (no CPE)range: < 4.1.15-150200.3.56.1
- (no CPE)range: < 4.1.15-150200.3.56.1
- (no CPE)range: < 4.1.18-150200.4.39.3
- (no CPE)range: < 4.1.31-150200.4.50.4
- (no CPE)range: < 4.1.46-150200.3.71.5
- (no CPE)range: < 4.1.11-150200.3.18.2
- (no CPE)range: < 4.1.20-150200.3.30.2
- (no CPE)range: < 4.1.34-150200.3.47.6
- (no CPE)range: < 0.28-150200.3.15.2
- (no CPE)range: < 4.1.36-150200.3.52.1
- (no CPE)range: < 4.1-150200.11.55.4
- (no CPE)range: < 4.1-150200.11.55.2
- (no CPE)range: < 4.1.26-150200.3.45.4
- (no CPE)range: < 4.1.36-150200.3.64.2
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-727h-hrw8-jg8qghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-26520ghsaADVISORY
- www.debian.org/security/2022/dsa-5196ghsavendor-advisoryx_refsource_DEBIANWEB
- github.com/pgjdbc/pgjdbc/pull/2454/commits/017b929977b4f85795f9ad2fa5de6e80978b8cccghsax_refsource_MISCWEB
- github.com/pgjdbc/pgjdbc/security/advisories/GHSA-673j-qm5f-xpv8ghsax_refsource_MISCWEB
- jdbc.postgresql.org/documentation/changelog.htmlghsax_refsource_MISCWEB
- jdbc.postgresql.org/documentation/head/tomcat.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.