{"answers":{"affected":"3 open source packages ship an affected version, including safety. It affects 1 product.","exploited":"There is no known exploitation of CVE-2020-5252 in the wild and no public exploit code.","fix":"Upgrade safety to a fixed version for your release line: 1.8.7 or 1.9.0.","what":"CVE-2020-5252 is a medium-severity vulnerability in pyupio safety, published on 23 Mar 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2020-5252 and fix it if it is affected.\n\nWhat it is: CVE-2020-5252 is a medium-severity vulnerability in pyupio safety, published on 23 Mar 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2020-5252 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- safety (PyPI): affected all versions; fixed in 1.8.7\n- safety (PyPI): affected all versions; fixed in 1.9.0\n- safety (PyPI): affected all versions; fixed in 1.9.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-2020-5252/ (Markdown: https://insights.sbomify.com/CVE-2020-5252/index.md)","id":"CVE-2020-5252","markdown":"https://insights.sbomify.com/CVE-2020-5252/index.md","name":"CVE-2020-5252","record":{"aliases":["GHSA-7q25-qrjw-6fg2","PYSEC-2020-101"],"analysis":{"component_type":"developer_tool","fix_type":"workaround","impacts":["security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Python security scanner","requires_auth":"high_privilege","summary":"Attackers can bypass Safety package detection by exploiting Python environment characteristics, requiring users to run the tool in isolated environments.","user_interaction":"required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"safety","vendor":"pyup"}],"cvss":{"score":5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-807","name":"Reliance on Untrusted Inputs in a Security Decision"}],"description":"The command-line \"safety\" package for Python has a potential security issue. There are two Python characteristics that allow malicious code to “poison-pill” command-line Safety package detection routines by disguising, or obfuscating, other malicious or non-secure packages. This vulnerability is considered to be of low severity because the attack makes use of an existing Python condition, not the Safety tool itself. This can happen if: You are running Safety in a Python environment that you don’t trust. You are running Safety from the same Python environment where you have your dependencies installed. Dependency packages are being installed arbitrarily or without proper verification. Users can mitigate this issue by doing any of the following: Perform a static analysis by installing Docker and running the Safety Docker image: $ docker run --rm -it pyupio/safety check -r requirements.txt Run Safety against a static dependencies list, such as the requirements.txt file, in a separate, clean Python environment. Run Safety from a Continuous Integration pipeline. Use PyUp.io, which runs Safety in a controlled environment and checks Python for dependencies without any need to install them. Use PyUp's Online Requirements Checker.","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":"Malicious package may avoid detection in python auditing","id":"CVE-2020-5252","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"security_feature_bypass","year":"2020"},"n_packages":3,"n_references":3,"next":{"headline":"Privilege escalation in NetHack","id":"CVE-2020-5253"},"packages":[{"ecosystem":"PyPI","fixed":["1.8.7"],"introduced":["0"],"last_affected":[],"package":"safety","purl":"pkg:pypi/safety","source":"PYSEC-2020-101"},{"ecosystem":"PyPI","fixed":["1.9.0"],"introduced":["0"],"last_affected":[],"package":"safety","purl":null,"source":"GHSA-7q25-qrjw-6fg2"},{"ecosystem":"PyPI","fixed":["1.9.0"],"introduced":["0"],"last_affected":[],"package":"safety","purl":"pkg:pypi/safety","source":"GHSA-7q25-qrjw-6fg2"}],"prev":{"headline":"Information disclosure in parse-server","id":"CVE-2020-5251"},"products":["safety"],"published":"2020-03-23","related":[],"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-04","vendors":["pyupio"]},"summary":"Attackers can bypass Safety package detection by exploiting Python environment characteristics, requiring users to run the tool in isolated environments.","url":"https://insights.sbomify.com/CVE-2020-5252/"}