pysec-2023-51
Vulnerability from pysec
Published
2023-01-31 10:15
Modified
2023-05-04 03:49
Details

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.

Impacted products
Name purl
ubi-reader pkg:pypi/ubi-reader
Aliases



{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "ubi-reader",
        "purl": "pkg:pypi/ubi-reader"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.8.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "0.5.0",
        "0.6.0",
        "0.6.3",
        "0.6.4",
        "0.6.5",
        "0.6.6",
        "0.6.7",
        "0.6.8",
        "0.6.9",
        "0.7.0",
        "0.7.2",
        "0.8.0",
        "0.8.2"
      ]
    }
  ],
  "aliases": [
    "CVE-2023-0591"
  ],
  "details": "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\u0027s possible to force ubi_reader to write outside of the extraction directory. This issue affects ubi-reader before 0.8.5.",
  "id": "PYSEC-2023-51",
  "modified": "2023-05-04T03:49:48.432460Z",
  "published": "2023-01-31T10:15:00Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/"
    },
    {
      "type": "WEB",
      "url": "https://github.com/jrspruitt/ubi_reader/pull/57"
    }
  ]
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…