Skip to main content

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

CVE-2023-0591

Severity Medium
Score 5.5/10

Summary

The package ubi-reader prior to 0.8.2 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.

  • LOW
  • LOCAL
  • HIGH
  • UNCHANGED
  • REQUIRED
  • NONE
  • NONE
  • NONE

CWE-22 - Path Traversal

Path traversal (or directory traversal), is a vulnerability that allows malicious users to traverse the server's root directory, gaining access to arbitrary files and folders such as application code & data, back-end credentials, and sensitive operating system files. In the worst-case scenario, an attacker could potentially execute arbitrary files on the server, resulting in a denial of service attack. Such an exploit may severely impact the integrity, confidentiality, and availability of an application.

Advisory Timeline

  • Published