PyPI: binwalk
CVE-2022-4510
Safety vulnerability ID: SFTY-20230126-64480
Safety legacy ID: pyup.io-54641
Affected versions of binwalk from 2.1.2b through 2.3.3 included are vulnerable to path traversal and remote code execution. By crafting a malicious PFS filesystem file, an attacker can trigger the PFS extractor when binwalk is run in extraction mode (-e), causing files to be extracted to arbitrary locations. The vulnerability is associated with src/binwalk/plugins/unpfs.py.
Overview
Path traversal in binwalk
Advisory
Affected versions of binwalk from 2.1.2b through 2.3.3 included are vulnerable to path traversal and remote code execution. By crafting a malicious PFS filesystem file, an attacker can trigger the PFS extractor when binwalk is run in extraction mode (-e), causing files to be extracted to arbitrary locations. The vulnerability is associated with src/binwalk/plugins/unpfs.py.
How to Fix
We recommend updating binwalk to the latest non-vulnerable version.
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20230126-64480/CVE-2022-4510
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-4510
- https://github.com/ReFirmLabs/binwalk/pull/617
- https://github.com/advisories/GHSA-3cm8-v4mc-gppg
- https://nvd.nist.gov/vuln/detail/CVE-2022-4510
- https://nvd.nist.gov/vuln/detail/CVE-2022-4510
- https://github.com/ReFirmLabs/binwalk/pull/617
- https://security.gentoo.org/glsa/202309-07
- https://lists.debian.org/debian-lts-announce/2025/12/msg00022.html
- https://github.com/advisories/GHSA-3cm8-v4mc-gppg
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
