Skip to content

Path traversal in ubi-reader

Moderate severity GitHub Reviewed Published Jan 31, 2023 to the GitHub Advisory Database • Updated Sep 2, 2023

Package

pip ubi-reader (pip)

Affected versions

< 0.8.5

Patched versions

0.8.5

Description

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.

References

Published by the National Vulnerability Database Jan 31, 2023
Published to the GitHub Advisory Database Jan 31, 2023
Reviewed Jan 31, 2023
Last updated Sep 2, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

EPSS score

0.076%
(33rd percentile)

Weaknesses

CVE ID

CVE-2023-0591

GHSA ID

GHSA-vp2x-3mc3-3cj4

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.