CVE-2022-0959: Pgadmin4 Path Traversal Vulnerability
MODERATECVE-2022-0959 is a MODERATE (CVSS 6.5) path traversal vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Pgadmin4 libraries in the PyPI ecosystem. The issue involves pgadmin 4 path traversal vulnerability. Remediation is available by upgrading affected packages to version 6.7.
CVE-2022-0959 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2022-0959
To remediate this vulnerability, upgrade all affected Pgadmin4 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pgadmin4>=6.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pgadmin4
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-0959, inspect your installed packages using pip:
pip show pgadmin4
Analyze the terminal output to locate any version of Pgadmin4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.7), your application is affected.
Note: The pip show pgadmin4 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Pgadmin4, 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-0959 Affected Pgadmin4 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pgadmin4
|
PyPI |
< 6.7
|
6.7
|
References
Frequently Asked Questions
What is CVE-2022-0959?
Which Pgadmin4 versions are affected?
What version fixes CVE-2022-0959?
Is pgadmin4 affected?
What is the CVSS score of CVE-2022-0959?
What CWE is associated with CVE-2022-0959?
How can I check PyPI dependencies for CVE-2022-0959?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cr8c-972v-rmp3",
"modified" : "2023-06-30T20:26:42Z",
"published" : "2022-03-17T00:00:24Z",
"aliases" : [ "CVE-2022-0959" ],
"summary" : "pgAdmin 4 Path Traversal vulnerability",
"details" : "When run in server mode, pgAdmin 4 allows users to store files on the server under individual storage directories. Files such as SQL scripts may be uploaded through the user interface. The URI to which upload requests are made fails to validate the upload path to prevent path traversal techniques being used to store files outside of the storage directory. A malicious, but authorised and authenticated user can construct an HTTP request using their existing CSRF token and session cookie to manually upload files to any location that the operating system user account under which pgAdmin is running has permission to write.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pgadmin4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.7"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-0959"
}, {
"type" : "WEB",
"url" : "https://github.com/pgadmin-org/pgadmin4/commit/dccd4f0bbaafa783d9f0360c7592b128d5cc3928"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2063759"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pgadmin-org/pgadmin4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-434" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-30T20:26:42Z",
"nvd_published_at" : "2022-03-16T15:15:00Z"
}
}