Path Traversal in Microsoft Binwalk
CVE-2022-4510
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.
Vulnerability class: Path Traversal (Directory Traversal)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.229, 97.8th percentile (scored ); up from 0.220 30 days earlier. About EPSS.
EPSS over last 30 days · oldest: 0.220 · newest: 0.229 · change: +0.009
Affected products
- Microsoft Binwalk
- Refirm Labs Binwalk — versions 2.1.2b
Weakness classification (CWE)
Public exploits and proof-of-concept code
4 public repositories with exploit or proof-of-concept code for this CVE:
- adhikara13/CVE-2022-4510-WalkingPath (14 stars, last pushed 2023-06-27): 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 stars, last pushed 2023-02-06): Binwalk Remote Command Execution
- Kalagious/BadPfs-CVE-2022-4510 (1 star, last pushed 2023-07-11): Python script that generates pfs payloads to exploit CVE-2022-4510
- hheeyywweellccoommee/CVE-2022-4510-yjrvc
Also mentioned in 13 other repositories (Aledangelo/Pilgrimage_Writeup, ARPSyndicate/cvemon, ghgasimovhikmat/HTB_Pilgrimage, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- github.com/ReFirmLabs/binwalk/pull/617 (Exploit, Patch, Third Party Advisory)
- security.gentoo.org/glsa/202309-07
- lists.debian.org/debian-lts-announce/2025/12/msg00022.html
This CVE has public exploit evidence. See the latest CVEs with public exploits.