GMS-2022-75: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
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
.
References
Detect and mitigate GMS-2022-75 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →