CVE-2023-0591
MEDIUM 5.5CVSS 3.1Path 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.
- Published
- 31 Jan 2023
- Last modified
- 17 Jun 2026
- Assigned by
- research@onekey.com
- NVD status
- Modified
- Weakness
- CWE-22
- Also known as
- GHSA-vp2x-3mc3-3cj4PYSEC-2023-51
- Sources
- NVDJSONOSV GHSA-vp2x-3mc3-3cj4JSONOSV PYSEC-2023-51JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N | |
| NVD | research@onekey.com (Secondary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | ubi_reader_project | ubi_readercpe:2.3:a:ubi_reader_project:ubi_reader:*:*:*:*:*:*:*:* |
< 0.8.5 | 0.8.5 |
| OSV | PyPI | ubi-reader | < 0.8.5 | 0.8.5 |
References
- https://github.com/jrspruitt/ubi_reader/pull/57 · Patch, Third Party Advisory, WEB
- https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/ · Exploit, Third Party Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2023-0591 · ADVISORY
- https://github.com/jrspruitt/ubi_reader/commit/d5d68e6b1b9f7070c29df5f67fc060f579ae9139 · WEB
- https://github.com/jrspruitt/ubi_reader · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/ubi-reader/PYSEC-2023-51.yaml · WEB
- https://github.com/advisories/GHSA-vp2x-3mc3-3cj4 · ADVISORY
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 31 Jan 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 31 Jan 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 31 Jan 2023)