Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS12cDJ4LTNtYzMtM2NqNM4AAxTK

Path traversal in ubi-reader

ubireader_extract_files is vulnerable to path traversal when run against specifically crafted UBIFS files, allowing the attacker to overwrite files outside of the extraction directory (provided the process has write access to that file or directory). This is due to the fact that a node name (dent_node.name) is considered trusted and joined to the extraction directory path during processing, then the node content is written to that joined path. By crafting a malicious UBIFS file with node names holding path traversal payloads (e.g. ../../tmp/outside.txt), it's possible to force ubi_reader to write outside of the extraction directory. This issue affects ubi-reader before 0.8.5.

Permalink: https://github.com/advisories/GHSA-vp2x-3mc3-3cj4
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS12cDJ4LTNtYzMtM2NqNM4AAxTK
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: about 1 year ago
Updated: 8 months ago


CVSS Score: 5.5
CVSS vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Identifiers: GHSA-vp2x-3mc3-3cj4, CVE-2023-0591
References: Repository: https://github.com/jrspruitt/ubi_reader
Blast Radius: 7.0

Affected Packages

pypi:ubi-reader
Dependent packages: 2
Dependent repositories: 19
Downloads: 10,199 last month
Affected Version Ranges: < 0.8.5
Fixed in: 0.8.5
All affected versions: 0.5.0, 0.6.0, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8, 0.6.9, 0.7.0, 0.7.2, 0.8.0, 0.8.2
All unaffected versions: 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9