{"answers":{"affected":"4 open source packages ship an affected version, including league/flysystem. It affects 2 products.","exploited":"There is no known exploitation of CVE-2021-32708 in the wild and no public exploit code.","fix":"Upgrade league/flysystem to a fixed version for your release line: 1.1.4 or 2.1.1.","what":"CVE-2021-32708 is a critical vulnerability in Fedoraproject Fedora, published on 24 Jun 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-32708 and fix it if it is affected.\n\nWhat it is: CVE-2021-32708 is a critical vulnerability in Fedoraproject Fedora, published on 24 Jun 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-32708 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- league/flysystem (Packagist): affected all versions; fixed in 1.1.4\n- league/flysystem (Packagist): affected all versions; fixed in 1.1.4\n- league/flysystem (Packagist): affected from 2.0.0; fixed in 2.1.1\n- league/flysystem (Packagist): affected from 2.0.0; fixed in 2.1.1\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-32708/ (Markdown: https://insights.sbomify.com/CVE-2021-32708/index.md)","id":"CVE-2021-32708","markdown":"https://insights.sbomify.com/CVE-2021-32708/index.md","name":"CVE-2021-32708","record":{"aliases":["CLSA-2026-1777596493","CLSA-2026-1777596494","DEBIAN-CVE-2021-32708","GHSA-9f46-5r25-5wfm","UBUNTU-CVE-2021-32708"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"PHP file storage library","requires_auth":"none","summary":"A race condition in Flysystem allows remote code execution if specific upload and storage configurations are present.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fedora","vendor":"fedoraproject"},{"product":"flysystem","vendor":"thephpleague"}],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"}],"description":"Flysystem is an open source file storage library for PHP. The whitespace normalisation using in 1.x and 2.x removes any unicode whitespace. Under certain specific conditions this could potentially allow a malicious user to execute code remotely. The conditions are: A user is allowed to supply the path or filename of an uploaded file, the supplied path or filename is not checked against unicode chars, the supplied pathname checked against an extension deny-list, not an allow-list, the supplied path or filename contains a unicode whitespace char in the extension, the uploaded file is stored in a directory that allows PHP code to be executed. Given these conditions are met a user can upload and execute arbitrary code on the system under attack. The unicode whitespace removal has been replaced with a rejection (exception). For 1.x users, upgrade to 1.1.4. For 2.x users, upgrade to 2.1.1.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":"2024-10-19","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2024-10-19T12:49:56Z","kind":"github_poc","ref":"https://github.com/fazilbaig1/CVE-2021-32708","stars":1,"title":"Affected versions of this package are vulnerable to Race Condition. The whitespace normalisation using in 1.x and 2.x removes any unicode whitespace. Under certain specific conditions this could potentially allow a malicious user to execute code remotely."}],"tier":"poc_unverified"},"has_fix":true,"headline":"Time-of-check Time-of-use (TOCTOU) Race Condition in league/flysystem","id":"CVE-2021-32708","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":"fedoraproject:fedora","products":["fedoraproject:fedora"],"type":"race_condition","year":"2021"},"n_packages":4,"n_references":6,"next":{"headline":"Creation of order credits was not validated by acl in admin orders","id":"CVE-2021-32709"},"packages":[{"ecosystem":"Packagist","fixed":["1.1.4"],"introduced":["0"],"last_affected":[],"package":"league/flysystem","purl":null,"source":"GHSA-9f46-5r25-5wfm"},{"ecosystem":"Packagist","fixed":["1.1.4"],"introduced":["0"],"last_affected":[],"package":"league/flysystem","purl":"pkg:composer/league/flysystem","source":"GHSA-9f46-5r25-5wfm"},{"ecosystem":"Packagist","fixed":["2.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"league/flysystem","purl":null,"source":"GHSA-9f46-5r25-5wfm"},{"ecosystem":"Packagist","fixed":["2.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"league/flysystem","purl":"pkg:composer/league/flysystem","source":"GHSA-9f46-5r25-5wfm"}],"prev":{"headline":"Bypass of image blocking in Nextcloud Mail","id":"CVE-2021-32707"},"products":["flysystem"],"published":"2021-06-24","related":[{"cvss_score":9.8,"headline":"PHP-CGI OS Command Injection","id":"CVE-2024-4577","kev_date_added":"2024-06-12","published":"2024-06-09"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2021-39226","kev_date_added":"2022-08-25","published":"2021-10-05"},{"cvss_score":9.8,"headline":"VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow","id":"CVE-2019-5544","kev_date_added":"2021-11-03","published":"2019-12-06"},{"cvss_score":9.6,"headline":"Google Chromium V8 Type Confusion","id":"CVE-2024-4947","kev_date_added":"2024-05-20","published":"2024-05-15"},{"cvss_score":9.6,"headline":"Google Chromium Visuals Use-After-Free","id":"CVE-2024-4671","kev_date_added":"2024-05-13","published":"2024-05-09"},{"cvss_score":9.6,"headline":"Google Chromium Mojo Insufficient Data Validation","id":"CVE-2022-3075","kev_date_added":"2022-09-08","published":"2022-09-26"},{"cvss_score":9.6,"headline":"Google Chromium Indexed DB API Use-After-Free","id":"CVE-2021-30633","kev_date_added":"2021-11-03","published":"2021-10-08"}],"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":"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["thephpleague"]},"summary":"A race condition in Flysystem allows remote code execution if specific upload and storage configurations are present.","url":"https://insights.sbomify.com/CVE-2021-32708/"}