5.0
MEDIUM
CVE-2020-5252
"Python Safety Package Python Characteristic Manipulation Vulnerability"
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.

INFO

Published Date :

March 23, 2020, 11:15 p.m.

Last Modified :

March 30, 2020, 4:16 p.m.

Remotely Exploitable :

No

Impact Score :

4.0

Exploitability Score :

0.6
Public PoC/Exploit Available at Github

CVE-2020-5252 has a 3 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

Affected Products

The following products are affected by CVE-2020-5252 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Pyup safety
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2020-5252.

URL Resource
https://github.com/akoumjian/python-safety-vuln Product Third Party Advisory
https://github.com/pyupio/safety/security/advisories/GHSA-7q25-qrjw-6fg2 Mitigation Third Party Advisory
https://pyup.io/posts/patched-vulnerability/ Vendor Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

None

JavaScript

Updated: 4 years, 6 months ago
0 stars 0 fork 0 watcher
Born at : Feb. 29, 2020, 3:09 a.m. This repo has been linked 1 different CVEs too.

Circumvent any python package scanner installed to the same python environment.

Python

Updated: 3 years, 2 months ago
3 stars 1 fork 1 watcher
Born at : Feb. 17, 2020, 11:51 a.m. This repo has been linked 1 different CVEs too.

A command line tool for detecting vulnerabilities in Python dependencies and doing safe package installs

security security-tools vulnerabilities vulnerability-scanners dependency-analysis supply-chain python developer-tools pipfile pip requirements devsecops

Python Dockerfile Jinja

Updated: 3 months ago
51 stars 8 fork 8 watcher
Born at : Oct. 6, 2019, 2:11 p.m. This repo has been linked 1 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2020-5252 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2020-5252 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Mar. 30, 2020

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:L/AC:M/Au:N/C:N/I:P/A:N)
    Added CVSS V3.1 NIST AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N
    Changed Reference Type https://github.com/akoumjian/python-safety-vuln No Types Assigned https://github.com/akoumjian/python-safety-vuln Product, Third Party Advisory
    Changed Reference Type https://github.com/pyupio/safety/security/advisories/GHSA-7q25-qrjw-6fg2 No Types Assigned https://github.com/pyupio/safety/security/advisories/GHSA-7q25-qrjw-6fg2 Mitigation, Third Party Advisory
    Changed Reference Type https://pyup.io/posts/patched-vulnerability/ No Types Assigned https://pyup.io/posts/patched-vulnerability/ Vendor Advisory
    Added CWE NIST NVD-CWE-noinfo
    Added CPE Configuration OR *cpe:2.3:a:pyup:safety:*:*:*:*:*:*:*:* versions up to (including) 1.8.6
  • CVE Modified by [email protected]

    Mar. 24, 2020

    Action Type Old Value New Value
    Changed 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. 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.
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2020-5252 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2020-5252 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.08 }} 0.00%

score

0.32597

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability