CVE-2020-5252

Malicious package may avoid detection in python auditing

MEDIUM
4.1
CVSS Score
Published: March 23, 2020 at 11:05 PM UTC
Updated: June 17, 2026 at 03:21 AM UTC
2 products affected across 2 vendorsSafetySafety

Using safety by pyupio?

Get instant alerts when new vulnerabilities affect safety - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.1
Exploit prediction
EPSS 0.4%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≤ 1.8.6
v < 1.9.0
Affected range stops below 1.9.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (3)

x_refsource_CONFIRMProductThird Party Advisory
https://github.com/akoumjian/python-safety-vuln
x_refsource_CONFIRMVendor Advisory
https://pyup.io/posts/patched-vulnerability/

CVSS

Attack Vector
LOCAL
Complexity
HIGH
Privileges
HIGH
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-807NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card