Search criteria

2 vulnerabilities found for ubi_reader by jrspruitt

CVE-2023-0591 (GCVE-0-2023-0591)

Vulnerability from cvelistv5 – Published: 2023-01-31 09:18 – Updated: 2025-03-26 20:38
VLAI?
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.
CWE
  • CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Assigner
Impacted products
Vendor Product Version
jrspruitt ubi_reader Affected: 0 , < 0.8.5 (0.8.4)
Create a notification for this product.
Credits
Quentin Kaiser from ONEKEY Research Labs Jason Pruitt
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T05:17:50.021Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://github.com/jrspruitt/ubi_reader/pull/57"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-0591",
                "options": [
                  {
                    "Exploitation": "poc"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-03-26T20:38:06.296581Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-03-26T20:38:12.757Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "collectionURL": "https://pypi.org/project/ubi-reader/",
          "defaultStatus": "unaffected",
          "modules": [
            "ubireader_extract_files"
          ],
          "packageName": "ubi-reader",
          "product": "ubi_reader",
          "repo": "https://github.com/jrspruitt/ubi_reader",
          "vendor": " jrspruitt",
          "versions": [
            {
              "lessThan": "0.8.5",
              "status": "affected",
              "version": "0",
              "versionType": "0.8.4"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "user": "00000000-0000-4000-9000-000000000000",
          "value": "Quentin Kaiser from ONEKEY Research Labs"
        },
        {
          "lang": "en",
          "type": "remediation reviewer",
          "user": "00000000-0000-4000-9000-000000000000",
          "value": "Jason Pruitt"
        }
      ],
      "datePublic": "2023-01-31T08:00:00.000Z",
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\n\n\u003cp\u003eubireader_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).\u003c/p\u003e\u003cp\u003eThis is due to the fact that a node name (\u003ccode\u003edent_node.name\u003c/code\u003e) 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. \u003ccode\u003e../../tmp/outside.txt\u003c/code\u003e), it\u0027s possible to force ubi_reader to write outside of the extraction directory.\u003c/p\u003e\n\n\u003cp\u003eThis issue affects ubi-reader before 0.8.5.\u003c/p\u003e"
            }
          ],
          "value": "\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\u0027s 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"
        }
      ],
      "exploits": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Proof-of-concept."
            }
          ],
          "value": "Proof-of-concept."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-126",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-126 Path Traversal"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "LOCAL",
            "availabilityImpact": "NONE",
            "baseScore": 5.5,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "NONE",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
            "version": "3.1"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-22",
              "description": "CWE-22 Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2023-01-31T09:32:07.165Z",
        "orgId": "2d533b80-6e4a-4e20-93e2-171235122846",
        "shortName": "ONEKEY"
      },
      "references": [
        {
          "url": "https://github.com/jrspruitt/ubi_reader/pull/57"
        },
        {
          "url": "https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/"
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Upgrade to version 0.8.5"
            }
          ],
          "value": "Upgrade to version 0.8.5"
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "title": "Path Traversal in ubi_reader",
      "x_generator": {
        "engine": "Vulnogram 0.1.0-dev"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "2d533b80-6e4a-4e20-93e2-171235122846",
    "assignerShortName": "ONEKEY",
    "cveId": "CVE-2023-0591",
    "datePublished": "2023-01-31T09:18:07.998Z",
    "dateReserved": "2023-01-31T09:05:42.738Z",
    "dateUpdated": "2025-03-26T20:38:12.757Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}

CVE-2023-0591 (GCVE-0-2023-0591)

Vulnerability from nvd – Published: 2023-01-31 09:18 – Updated: 2025-03-26 20:38
VLAI?
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.
CWE
  • CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Assigner
Impacted products
Vendor Product Version
jrspruitt ubi_reader Affected: 0 , < 0.8.5 (0.8.4)
Create a notification for this product.
Credits
Quentin Kaiser from ONEKEY Research Labs Jason Pruitt
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T05:17:50.021Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://github.com/jrspruitt/ubi_reader/pull/57"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-0591",
                "options": [
                  {
                    "Exploitation": "poc"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-03-26T20:38:06.296581Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-03-26T20:38:12.757Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "collectionURL": "https://pypi.org/project/ubi-reader/",
          "defaultStatus": "unaffected",
          "modules": [
            "ubireader_extract_files"
          ],
          "packageName": "ubi-reader",
          "product": "ubi_reader",
          "repo": "https://github.com/jrspruitt/ubi_reader",
          "vendor": " jrspruitt",
          "versions": [
            {
              "lessThan": "0.8.5",
              "status": "affected",
              "version": "0",
              "versionType": "0.8.4"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "user": "00000000-0000-4000-9000-000000000000",
          "value": "Quentin Kaiser from ONEKEY Research Labs"
        },
        {
          "lang": "en",
          "type": "remediation reviewer",
          "user": "00000000-0000-4000-9000-000000000000",
          "value": "Jason Pruitt"
        }
      ],
      "datePublic": "2023-01-31T08:00:00.000Z",
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\n\n\u003cp\u003eubireader_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).\u003c/p\u003e\u003cp\u003eThis is due to the fact that a node name (\u003ccode\u003edent_node.name\u003c/code\u003e) 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. \u003ccode\u003e../../tmp/outside.txt\u003c/code\u003e), it\u0027s possible to force ubi_reader to write outside of the extraction directory.\u003c/p\u003e\n\n\u003cp\u003eThis issue affects ubi-reader before 0.8.5.\u003c/p\u003e"
            }
          ],
          "value": "\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\u0027s 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"
        }
      ],
      "exploits": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Proof-of-concept."
            }
          ],
          "value": "Proof-of-concept."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-126",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-126 Path Traversal"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "LOCAL",
            "availabilityImpact": "NONE",
            "baseScore": 5.5,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "NONE",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
            "version": "3.1"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-22",
              "description": "CWE-22 Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2023-01-31T09:32:07.165Z",
        "orgId": "2d533b80-6e4a-4e20-93e2-171235122846",
        "shortName": "ONEKEY"
      },
      "references": [
        {
          "url": "https://github.com/jrspruitt/ubi_reader/pull/57"
        },
        {
          "url": "https://onekey.com/blog/security-advisory-remote-command-execution-in-binwalk/"
        }
      ],
      "solutions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "Upgrade to version 0.8.5"
            }
          ],
          "value": "Upgrade to version 0.8.5"
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "title": "Path Traversal in ubi_reader",
      "x_generator": {
        "engine": "Vulnogram 0.1.0-dev"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "2d533b80-6e4a-4e20-93e2-171235122846",
    "assignerShortName": "ONEKEY",
    "cveId": "CVE-2023-0591",
    "datePublished": "2023-01-31T09:18:07.998Z",
    "dateReserved": "2023-01-31T09:05:42.738Z",
    "dateUpdated": "2025-03-26T20:38:12.757Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}