{"id":"CVE-2023-0591","published":"2023-01-31T09:18:07Z","modified":"2025-03-26T20:38:12Z","title":"Path Traversal in ubi_reader","vendor":"jrspruitt","product":"ubi_reader","tier":"tail","description":{"text":"\nubireader_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).\n\nThis 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.\n\n\n\nThis issue affects ubi-reader before 0.8.5.\n\n","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00402,"percentile":0.35294,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/jrspruitt/ubi_reader/pull/57","tags":[]},{"url":"https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/","tags":[]}],"priority":{"score":10.9,"factors":[{"name":"EPSS percentile","points":7.06},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"jrspruitt","affectedVersions":[{"vendor":" jrspruitt","product":"ubi_reader","versions":["< 0.8.5"]}],"solutions":{"items":["Upgrade to version 0.8.5"],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-126","name":"Path Traversal"}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-26T20:38:06.296581Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"ubi-reader","vulnerableRanges":["<0.8.5"],"patched":["0.8.5"],"from":["GHSA-vp2x-3mc3-3cj4","PYSEC-2023-51"],"provenance":"source"}],"summary":{"text":"The ubi_reader product from jrspruitt has a path traversal flaw in its ubireader_extract_files component, where node names read from crafted UBIFS files are trusted and joined to the extraction directory path before content is written. An attacker who supplies a specially crafted UBIFS file, with a local attack vector and requiring a user to process that file, can overwrite files outside the extraction directory, provided the process has write access to the target file or directory.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:01:24Z"},"euvd":{"id":"EUVD-2023-0251","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2022-4572","published":"2022-12-17","fixed":"0.8.5","kev":false,"link":{"from":"CVE-2022-4572","to":"CVE-2023-0591","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:ubi-reader","fromFixed":"0.8.2","toFixed":"0.8.5","daysApart":45},{"kind":"similar","provenance":"machine","score":0.38,"basis":"same package + description similarity"}]}},{"cve":"CVE-2023-0591","published":"2023-01-31","fixed":"0.8.5","kev":false}],"package":"PyPI:ubi-reader"}}