Skip to content
Heist/ feed
Back to feed
Medium

Path Traversal in ubi_reader

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-0591
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 04:56 UTC · Revision 1

Source evidence

Path Traversal in ubi_reader

core-osv · Original source

Published 31 Jan 2023, 09:18 UTC

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.

osv:CVE-2023-0591
Complete source record
{
  "id": "794e0a101d22989d0f50dcdf70ba822fc7dbdb08e5fe2c6dca48ddd335a3da9c",
  "url": "https://osv.dev/vulnerability/CVE-2023-0591",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Path Traversal in ubi_reader",
    "summary": "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.",
    "evidence": "osv:CVE-2023-0591",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2023-0591",
      "aliases": [
        "CVE-2023-0591",
        "GHSA-vp2x-3mc3-3cj4",
        "PYSEC-2023-51"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/onekey-sec/ubi_reader",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "26c41bd1b63417e2eef07db2281b21f9a94d0fab"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.8.5"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "cpe": "cpe:2.3:a:ubi_reader_project:ubi_reader:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.8.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.8.0-master",
            "v0.7.2-master",
            "v0.7.1-master",
            "v0.6.3-master",
            "v0.6.2-testing",
            "v0.6.2-master",
            "v0.5.0-master",
            "v2_ui",
            "v1_ui"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-0591.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:33.454859423Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/0xxx/CVE-2023-0591.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-0591",
        "https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/",
        "https://github.com/jrspruitt/ubi_reader/pull/57",
        "https://github.com/jrspruitt/ubi_reader",
        "https://pypi.org/project/ubi-reader/"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22"
        ],
        "cna_assigner": "ONEKEY",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/0xxx/CVE-2023-0591.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-0591",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 500388,
  "published_at": "2023-01-31T09:18:07.998+00:00"
}