# CVE-2023-0591: Path Traversal in ubi\_reader

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: None; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.36% (percentile 23, 2026-11-26)
- **CWE:** CWE-22
- **Aliases:** GHSA-vp2x-3mc3-3cj4, PYSEC-2023-51
- **Published:** 2023-01-31T09:18:07.998Z
- **Modified:** 2026-06-17T05:25:53.177Z

## Who should check

- Projects that depend on PyPI package ubi-reader (\< 0.8.5)
- Anyone running jrspruitt ubi\_reader \< 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.

## Affected and fixed versions

- PyPI `ubi-reader`: affected \< 0.8.5; fixed 0.8.5 (osv)
- jrspruitt ubi\_reader: \< 0.8.5 (cvelist)

## Mitigation

- Upgrade ubi-reader to 0.8.5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-0591. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-0591.md
Affected: ubi-reader < 0.8.5
Fixed in: 0.8.5

Steps:
1. Search this machine and project for ubi-reader (PyPI), jrspruitt ubi_reader: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-0591 being exploited?

There is no confirmed exploitation: CVE-2023-0591 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.36% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-0591?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2023-0591?

ubi-reader \< 0.8.5.

### Is there a fix for CVE-2023-0591?

Yes. Fixed in 0.8.5. Upgrade ubi-reader to 0.8.5 or later.

### How do I check if I'm affected by CVE-2023-0591?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-0591>
- vendor: <https://github.com/advisories/GHSA-vp2x-3mc3-3cj4>
- patch: <https://github.com/jrspruitt/ubi_reader/pull/57>
- patch: <https://github.com/jrspruitt/ubi_reader/commit/d5d68e6b1b9f7070c29df5f67fc060f579ae9139>
- exploit: <https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/>
- other: <https://github.com/jrspruitt/ubi_reader>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/ubi-reader/PYSEC-2023-51.yaml>
- other: <https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-0591>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-vp2x-3mc3-3cj4> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2023-51> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-0591> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-0591>
