Description
A path traversal vulnerability was identified in ReFirm Labs binwalk from version 2.1.2b through 2.3.3 included. By crafting a malicious PFS filesystem file, an attacker can get binwalk's PFS extractor to extract files at arbitrary locations when binwalk is run in extraction mode (-e option). Remote code execution can be achieved by building a PFS filesystem that, upon extraction, would extract a malicious binwalk module into the folder .config/binwalk/plugins.
This vulnerability is associated with program files src/binwalk/plugins/unpfs.py.
This issue affects binwalk from 2.1.2b through 2.3.3 included.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Refirm Labs | binwalk | 2.1.2b – ≤ 2.3.3 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | binwalk | 2.3.4+dfsg1-1 | — |
| Debian 13 | binwalk | 2.3.4+dfsg1-1 | — |
| Debian 12 | binwalk | 2.3.4+dfsg1-1 | — |
| Debian 11 | binwalk | 2.3.1+dfsg1-1+deb11u1 | DLA-4410-1 |
| Debian 10 | binwalk | 2.1.2~git20180830+dfsg1-1+deb10u1 | DLA-3339-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | binwalk | No fix yet | — |
| Ubuntu 20.04 LTS | binwalk | No fix yet | — |
| Ubuntu 18.04 LTS | binwalk | No fix yet | — |
| Ubuntu 16.04 LTS | binwalk | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | binwalk | 2.3.3-2.1 | openSUSE-SU-2024:12649-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Binwalk v2.3.2 - Remote Command Execution (RCE) EDB-51249 · remote · Apr 5, 2023
GitHub 3 repositories
-
adhikara13/CVE-2022-4510-WalkingPath ★ 14 · Jun 27, 2023
A Python script for generating exploits targeting CVE-2022-4510 RCE Binwalk. It supports SSH, command execution, and reverse shell options. Exploits are saved in PNG format. Ideal for testing and dem…
-
electr0sm0g/CVE-2022-4510 ★ 9 · Feb 6, 2023
Binwalk Remote Command Execution
-
Kalagious/BadPfs-CVE-2022-4510 ★ 1 · Jul 11, 2023
Python script that generates pfs payloads to exploit CVE-2022-4510
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | binwalk | >= 2.1.2b, <= 2.3.3 | — | GHSA-3cm8-v4mc-gppg |
| PyPI | binwalk | >= 2.1.2b, < 2.3.4 | 2.3.4 | PYSEC-2026-787 |
Advisories 3
- DLA-3339-1 binwalk - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:12649-1 binwalk-2.3.3-2.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- DLA-4410-1 binwalk - security update Debian Security (DSA / DLA) · Dec 16, 2025