Skip to content
OpenAdvisories
High · 7.8 Public exploit CVE-2022-4510 EUVD-2023-0317GHSA-3cm8-v4mc-gppgPYSEC-2026-787

Path Traversal in binwalk

Published Jan 25, 2023 · Updated Dec 16, 2025 · Assigned by ONEKEY

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

VendorProductAffectedFixed
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.

ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

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

EcosystemPackageAffectedFixedRecord
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

References