CVE-2022-4572: Ubi reader Path Traversal Vulnerability
MODERATECVE-2022-4572 is a MODERATE (CVSS 7.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Ubi reader libraries in the PyPI ecosystem. The issue involves ubi reader vulnerable to path traversal. Remediation is available by upgrading affected packages to version 0.8.5.
CVE-2022-4572 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H).
How to Fix CVE-2022-4572
To remediate this vulnerability, upgrade all affected Ubi reader 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 ubi-reader>=0.8.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show ubi-reader
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-4572, inspect your installed packages using pip:
pip show ubi-reader
Analyze the terminal output to locate any version of Ubi reader in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.5), your application is affected.
Note: The pip show ubi-reader command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Ubi reader, 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-4572 Affected Ubi reader Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ubi-reader
|
PyPI |
< 0.8.5
|
0.8.5
|
References
Frequently Asked Questions
What is CVE-2022-4572?
Which Ubi reader versions are affected?
What version fixes CVE-2022-4572?
Is ubi-reader affected?
What is the CVSS score of CVE-2022-4572?
What CWE is associated with CVE-2022-4572?
How can I check PyPI dependencies for CVE-2022-4572?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hc37-84v3-8gmq",
"modified" : "2024-11-18T23:09:08Z",
"published" : "2022-12-17T03:30:25Z",
"aliases" : [ "CVE-2022-4572" ],
"summary" : "UBI Reader vulnerable to Path Traversal",
"details" : "A vulnerability, which was classified as problematic, has been found in UBI Reader up to 0.8.0. Affected by this issue is the function ubireader_extract_files of the file ubireader/ubifs/output.py of the component UBIFS File Handler. The manipulation leads to path traversal. The attack may be launched remotely. Upgrading to version 0.8.5 can address this issue. The name of the patch is d5d68e6b1b9f7070c29df5f67fc060f579ae9139. It is recommended to upgrade the affected component. VDB-216146 is the identifier assigned to this vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "ubi-reader"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-4572"
}, {
"type" : "WEB",
"url" : "https://github.com/jrspruitt/ubi_reader/pull/57"
}, {
"type" : "WEB",
"url" : "https://github.com/jrspruitt/ubi_reader/commit/d5d68e6b1b9f7070c29df5f67fc060f579ae9139"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jrspruitt/ubi_reader"
}, {
"type" : "WEB",
"url" : "https://github.com/jrspruitt/ubi_reader/releases/tag/v0.8.5-master"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/ubi-reader/PYSEC-2022-43016.yaml"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.216146"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-19T18:13:09Z",
"nvd_published_at" : "2022-12-17T02:15:00Z"
}
}