{"answers":{"affected":"3 open source packages ship an affected version, including ubi-reader. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-0591 exists.","fix":"Upgrade ubi-reader to 0.8.5 or later.","what":"CVE-2023-0591 is a medium-severity path traversal vulnerability in ubi_reader, published on 31 Jan 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-0591 and fix it if it is affected.\n\nWhat it is: CVE-2023-0591 is a medium-severity path traversal vulnerability in ubi_reader, published on 31 Jan 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-0591 exists.\n\nAffected packages and fixed versions:\n- ubi-reader (PyPI): affected all versions; fixed in 0.8.5\n- ubi-reader (PyPI): affected all versions; fixed in 0.8.5\n- ubi-reader (PyPI): affected all versions; fixed in 0.8.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-0591/ (Markdown: https://insights.sbomify.com/CVE-2023-0591/index.md)","id":"CVE-2023-0591","markdown":"https://insights.sbomify.com/CVE-2023-0591/index.md","name":"CVE-2023-0591","record":{"aliases":["GHSA-vp2x-3mc3-3cj4","PYSEC-2023-51"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python UBIFS reader","requires_auth":"none","summary":"Attackers can overwrite arbitrary files outside the extraction directory by crafting malicious UBIFS files processed by ubi_reader.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"ONEKEY","cpe":[{"product":"ubi_reader","vendor":"ubi_reader_project"}],"cvss":{"score":5.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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).\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\nThis issue affects ubi-reader before 0.8.5.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Path Traversal in ubi_reader","id":"CVE-2023-0591","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2023"},"n_packages":3,"n_references":2,"next":{"headline":"Path traversal in jefferson","id":"CVE-2023-0592"},"packages":[{"ecosystem":"PyPI","fixed":["0.8.5"],"introduced":["0"],"last_affected":[],"package":"ubi-reader","purl":null,"source":"GHSA-vp2x-3mc3-3cj4"},{"ecosystem":"PyPI","fixed":["0.8.5"],"introduced":["0"],"last_affected":[],"package":"ubi-reader","purl":"pkg:pypi/ubi-reader","source":"GHSA-vp2x-3mc3-3cj4"},{"ecosystem":"PyPI","fixed":["0.8.5"],"introduced":["0"],"last_affected":[],"package":"ubi-reader","purl":"pkg:pypi/ubi-reader","source":"PYSEC-2023-51"}],"prev":{"headline":"Use after free in Kernel","id":"CVE-2023-0590"},"products":["ubi_reader"],"published":"2023-01-31","related":[{"cvss_score":5.4,"headline":"UBI Reader UBIFS File output.py ubireader_extract_files path traversal","id":"CVE-2022-4572","kev_date_added":null,"published":"2022-12-17"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-03-26","vendors":[" jrspruitt"]},"summary":"Attackers can overwrite arbitrary files outside the extraction directory by crafting malicious UBIFS files processed by ubi_reader.","url":"https://insights.sbomify.com/CVE-2023-0591/"}