{"id":"CVE-2022-4510","published":"2023-01-25T12:25:14Z","modified":"2025-12-16T09:06:07Z","title":"Path Traversal in binwalk","vendor":"Refirm Labs","product":"binwalk","tier":"tail","description":{"text":"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.\n This vulnerability is associated with program files src/binwalk/plugins/unpfs.py.\n\nThis issue affects binwalk from 2.1.2b through 2.3.3 included.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.2288,"percentile":0.97789,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/ReFirmLabs/binwalk/pull/617","tags":[]},{"url":"https://security.gentoo.org/glsa/202309-07","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/12/msg00022.html","tags":[]}],"priority":{"score":30.0,"factors":[{"name":"EPSS percentile","points":19.56},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.46}]},"exploitSources":{"exploitdb":{"count":1,"earliest":"2023-04-05"},"pocGithub":{"count":3,"skipped":0,"earliest":"2023-02-06","earliestUrl":"https://github.com/electr0sm0g/CVE-2022-4510","repos":[{"name":"adhikara13/CVE-2022-4510-WalkingPath","url":"https://github.com/adhikara13/CVE-2022-4510-WalkingPath","stars":14,"created":"2023-06-27"},{"name":"electr0sm0g/CVE-2022-4510","url":"https://github.com/electr0sm0g/CVE-2022-4510","stars":9,"created":"2023-02-06"},{"name":"Kalagious/BadPfs-CVE-2022-4510","url":"https://github.com/Kalagious/BadPfs-CVE-2022-4510","stars":1,"created":"2023-07-11"}]},"first":{"date":"2023-02-06","source":"PoC-in-GitHub","url":"https://github.com/electr0sm0g/CVE-2022-4510"},"provenance":"source"},"vendorSlug":"refirm-labs","affectedVersions":[{"vendor":"Refirm Labs","product":"binwalk","versions":[">= 2.1.2b, <= 2.3.3"]}],"workarounds":{"items":["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"],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-549","name":"Local Execution of Code"},{"id":"CAPEC-126","name":"Path Traversal"}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-03-27T19:54:52.860514Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"binwalk","vulnerableRanges":[">=2.1.2b, <=2.3.3",">=2.1.2b, <2.3.4"],"patched":["2.3.4"],"from":["GHSA-3cm8-v4mc-gppg","PYSEC-2026-787"],"provenance":"source"}],"euvd":{"id":"EUVD-2023-0317","exploited":false,"provenance":"source"},"exploits":[{"id":51249,"url":"https://www.exploit-db.com/exploits/51249","title":"Binwalk v2.3.2 - Remote Command Execution (RCE)","date":"2023-04-05","verified":false,"provenance":"source"}],"lineage":{"packageHistory":[{"cve":"CVE-2021-4287","published":"2022-12-27","fixed":"2.3.3","kev":false,"link":{"from":"CVE-2021-4287","to":"CVE-2022-4510","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:binwalk","fromFixed":"2.3.3","toFixed":"2.3.4","daysApart":29},{"kind":"similar","provenance":"machine","score":0.5,"basis":"same product + description similarity"}]}},{"cve":"CVE-2022-4510","published":"2023-01-25","fixed":"2.3.4","kev":false}],"package":"PyPI:binwalk"}}