CVEfocus › CVE database › CVE-2022-4510

CVE-2022-4510Path Traversal in binwalk

CVSS 7.8 HighEPSS 22.9% (higher than 98% of CVEs)Published 2023-01-25Updated 2025-12-16Assigner: ONEKEY

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.

CWE-22

What to do

Likely to be exploited: EPSS gives a 23% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.

Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed
5Fix pending
3Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04binwalkNot affected
vulnerable_code_not_present
Ubuntu 25.10binwalkNot affected
vulnerable_code_not_present
Ubuntu 24.04binwalkNot affected
vulnerable_code_not_present
Ubuntu 22.04binwalkFix pending2.3.3+dfsg1-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2022-4510
Ubuntu 20.04binwalkFix pending2.2.0+dfsg1-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2022-4510
Ubuntu 18.04binwalkFix pending
Ubuntu 16.04binwalkFix pending
Ubuntu 14.04binwalkFix pending
Debian 14binwalkFixed2.3.4+dfsg1-1DEBIAN-CVE-2022-4510
Debian 13binwalkFixed2.3.4+dfsg1-1DEBIAN-CVE-2022-4510
Debian 12binwalkFixed2.3.4+dfsg1-1DEBIAN-CVE-2022-4510
PyPI librarybinwalkFixed2.3.4GHSA-3cm8-v4mc-gppg

What the vendor says

As published in the CVE record by ONEKEY, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: The following workaround would fix the vulnerability: * removing the unpfs extractor from your local install of binwalk * disabling the unpfs extractor by editing binwalk's extract.conf configuration file * apply the fix provided at https://github.com/ReFirmLabs/binwalk/pull/617 https://github.com/ReFirmLabs/binwalk/pull/617

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.