{"answers":{"affected":"3 open source packages ship an affected version, including ansible-runner. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-3702 in the wild and no public exploit code.","fix":"Upgrade ansible-runner to 2.1.0 or later.","what":"CVE-2021-3702 is a medium-severity vulnerability in ansible-runner, published on 23 Aug 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-3702 and fix it if it is affected.\n\nWhat it is: CVE-2021-3702 is a medium-severity vulnerability in ansible-runner, published on 23 Aug 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-3702 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- ansible-runner (PyPI): affected from 2.0.0; fixed in 2.1.0\n- ansible-runner (PyPI): affected from 2.0.0; fixed in 2.1.0\n- ansible-runner (PyPI): affected from 2.0.0; fixed in 2.1.0\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-3702/ (Markdown: https://insights.sbomify.com/CVE-2021-3702/index.md)","id":"CVE-2021-3702","markdown":"https://insights.sbomify.com/CVE-2021-3702/index.md","name":"CVE-2021-3702","record":{"aliases":["GHSA-772j-xvf9-qpf5","PYSEC-2022-43068"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_read","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Ansible Runner library","requires_auth":"low_privilege","summary":"An attacker can exploit a race condition in ansible-runner to substitute a temporary directory, gaining unauthorized access to private data.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"ansible_runner","vendor":"redhat"}],"cvss":{"score":6.3,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"description":"A race condition flaw was found in ansible-runner, where an attacker could watch for rapid creation and deletion of a temporary directory, substitute their directory at that name, and then have access to ansible-runner's private_data_dir the next time ansible-runner made use of the private_data_dir. The highest Threat out of this flaw is to integrity and confidentiality.","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":"ansible-runner vulnerable to Race Condition","id":"CVE-2021-3702","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"race_condition","year":"2021"},"n_packages":3,"n_references":3,"next":{"headline":"It was found that the CVE-2021-27918, CVE-2021-31525 and CVE-2021-33196 have been incorrectly mentioned as fixed in RHSA for Serverless 1.16","id":"CVE-2021-3703"},"packages":[{"ecosystem":"PyPI","fixed":["2.1.0"],"introduced":["2.0.0"],"last_affected":[],"package":"ansible-runner","purl":null,"source":"GHSA-772j-xvf9-qpf5"},{"ecosystem":"PyPI","fixed":["2.1.0"],"introduced":["2.0.0"],"last_affected":[],"package":"ansible-runner","purl":"pkg:pypi/ansible-runner","source":"GHSA-772j-xvf9-qpf5"},{"ecosystem":"PyPI","fixed":["2.1.0"],"introduced":["2.0.0"],"last_affected":[],"package":"ansible-runner","purl":"pkg:pypi/ansible-runner","source":"PYSEC-2022-43068"}],"prev":{"headline":"ansible-runner has default temporary files written to world R/W locations","id":"CVE-2021-3701"},"products":["ansible-runner"],"published":"2022-08-23","related":[{"cvss_score":7.8,"headline":"ansible-runner vulnerable to shell command injection","id":"CVE-2021-4041","kev_date_added":null,"published":"2022-08-24"},{"cvss_score":6.6,"headline":"ansible-runner has default temporary files written to world R/W locations","id":"CVE-2021-3701","kev_date_added":null,"published":"2022-08-23"}],"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"An attacker can exploit a race condition in ansible-runner to substitute a temporary directory, gaining unauthorized access to private data.","url":"https://insights.sbomify.com/CVE-2021-3702/"}