PYSEC-2023-51
Vulnerability from pysec - Published: 2023-01-31 10:15 - Updated: 2023-05-04 03:49ubireader_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.
| Name | purl | ubi-reader | pkg:pypi/ubi-reader |
|---|
{
"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",
"GHSA-vp2x-3mc3-3cj4"
],
"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"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-vp2x-3mc3-3cj4"
}
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.