CVE-2023-0591
Python vulnerability analysis and mitigation

Overview

CVE-2023-0591 is a path traversal vulnerability affecting ubi-reader versions before 0.8.5. The vulnerability exists in the ubireaderextractfiles functionality when processing specifically crafted UBIFS files. The issue was discovered in early 2022 and was fixed with the release of version 0.8.5 (ONEKEY Blog, GitHub PR).

Technical details

The vulnerability occurs because a node name (dent_node.name) is considered trusted and joined to the extraction directory path during processing, after which the node content is written to that joined path. The vulnerability has a CVSS v3.1 Base Score of 5.5 (Medium) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N. It is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) (NVD).

Impact

When exploited, this vulnerability allows an attacker to overwrite files outside of the extraction directory, provided the process has write access to the target file or directory. This is particularly concerning if users run ubireader with elevated privileges to create block devices ([GitHub PR](https://github.com/jrspruitt/ubireader/pull/57)).

Mitigation and workarounds

The vulnerability was fixed in ubi-reader version 0.8.5. Users should upgrade to this version or later to mitigate the risk. The fix involves proper path validation before file extraction to prevent directory traversal attempts (GitHub PR).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management