{"answers":{"affected":"3 open source packages ship an affected version, including binwalk. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-4287 in the wild and no public exploit code.","fix":"Upgrade binwalk to 2.3.3 or later.","what":"CVE-2021-4287 is a medium-severity path traversal vulnerability in ReFirm Labs binwalk, published on 27 Dec 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-4287 and fix it if it is affected.\n\nWhat it is: CVE-2021-4287 is a medium-severity path traversal vulnerability in ReFirm Labs binwalk, published on 27 Dec 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-4287 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- binwalk (PyPI): affected all versions; fixed in 2.3.3\n- binwalk (PyPI): affected all versions; fixed in 2.3.3\n- binwalk (PyPI): affected all versions; fixed in 2.3.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-4287/ (Markdown: https://insights.sbomify.com/CVE-2021-4287/index.md)","id":"CVE-2021-4287","markdown":"https://insights.sbomify.com/CVE-2021-4287/index.md","name":"CVE-2021-4287","record":{"aliases":["DEBIAN-CVE-2021-4287","GHSA-8m3f-g62j-3vx8","PYSEC-2026-788","UBUNTU-CVE-2021-4287"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"binwalk firmware analysis","requires_auth":"none","summary":"Attackers can exploit symlink following in binwalk's archive extraction to read or modify arbitrary files on the system.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulDB","cpe":[{"product":"binwalk","vendor":"microsoft"}],"cvss":{"score":5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"}],"description":"A vulnerability, which was classified as problematic, was found in ReFirm Labs binwalk up to 2.3.2. Affected is an unknown function of the file src/binwalk/modules/extractor.py of the component Archive Extraction Handler. The manipulation leads to symlink following. It is possible to launch the attack remotely. Upgrading to version 2.3.3 is able to address this issue. The name of the patch is fa0c0bd59b8588814756942fe4cb5452e76c1dcd. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-216876.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"ReFirm Labs binwalk Archive Extraction extractor.py symlink","id":"CVE-2021-4287","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2021"},"n_packages":3,"n_references":5,"next":{"headline":"OpenMRS openmrs-module-referenceapplication userApp.gsp cross site scripting","id":"CVE-2021-4288"},"packages":[{"ecosystem":"PyPI","fixed":["2.3.3"],"introduced":["0"],"last_affected":[],"package":"binwalk","purl":null,"source":"GHSA-8m3f-g62j-3vx8"},{"ecosystem":"PyPI","fixed":["2.3.3"],"introduced":["0"],"last_affected":[],"package":"binwalk","purl":"pkg:pypi/binwalk","source":"GHSA-8m3f-g62j-3vx8"},{"ecosystem":"PyPI","fixed":["2.3.3"],"introduced":["0"],"last_affected":[],"package":"binwalk","purl":"pkg:pypi/binwalk","source":"PYSEC-2026-788"}],"prev":{"headline":"cocagne pysrp _ctsrp.py calculate_x information exposure","id":"CVE-2021-4286"},"products":["binwalk"],"published":"2022-12-27","related":[{"cvss_score":7.8,"headline":"Path Traversal in binwalk","id":"CVE-2022-4510","kev_date_added":null,"published":"2023-01-25"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-11","vendors":["ReFirm Labs"]},"summary":"Attackers can exploit symlink following in binwalk's archive extraction to read or modify arbitrary files on the system.","url":"https://insights.sbomify.com/CVE-2021-4287/"}