CVE-2022-26520: Postgresql Postgresql Vulnerability
LOWCVE-2022-26520 is a LOW postgresql vulnerability (General Security Weakness) affecting Postgresql libraries in the Maven ecosystem. The issue involves postgresql. Remediation is available by upgrading affected packages to version 42.3.3.
CVE-2022-26520 at a Glance
How to Fix CVE-2022-26520
To remediate this vulnerability, upgrade all affected Postgresql dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.3</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.postgresql
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-26520, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.postgresql
Analyze the terminal output to locate any version of Postgresql in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 42.3.3), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.postgresql command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Postgresql, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-26520 Affected Postgresql Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.postgresql:postgresql
|
Maven |
≥ 42.1.0
< 42.3.3
|
42.3.3
|
References
Frequently Asked Questions
What is CVE-2022-26520?
Which Postgresql versions are affected?
What version fixes CVE-2022-26520?
Is postgresql affected?
What CWE is associated with CVE-2022-26520?
How can I check Maven dependencies for CVE-2022-26520?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-727h-hrw8-jg8q",
"modified" : "2023-08-03T17:41:54Z",
"published" : "2022-03-11T00:02:02Z",
"aliases" : [ "CVE-2022-26520" ],
"summary" : "Path traversal in org.postgresql:postgresql",
"details" : "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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.postgresql:postgresql"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "42.1.0"
}, {
"fixed" : "42.3.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-673j-qm5f-xpv8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-26520"
}, {
"type" : "WEB",
"url" : "https://github.com/pgjdbc/pgjdbc/pull/2454/commits/017b929977b4f85795f9ad2fa5de6e80978b8ccc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pgjdbc/pgjdbc"
}, {
"type" : "WEB",
"url" : "https://jdbc.postgresql.org/documentation/changelog.html#version_42.3.3"
}, {
"type" : "WEB",
"url" : "https://jdbc.postgresql.org/documentation/head/tomcat.html"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2022/dsa-5196"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-08T00:02:20Z",
"nvd_published_at" : "2022-03-10T17:47:00Z"
}
}