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.

Created at: Dec 20, 2025Updated at: Dec 20, 2025

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.

Affected Package

Affecting binwalk package, versions
>=2.1.2b,<=2.3.3

Also affects

---

How to Fix

We recommend updating binwalk to the latest non-vulnerable version.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

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