CVE-2020-5252Pyup Safety
Medium 4.1
Follow: this CVE · Pyup · Pyup Safety We alert you by email or Slack (account required).
- Priority
- 25
- CVSS 3.1
- 4.1
- EPSS
- 0.4% probability of exploitation in 30 days · percentile 33
- Auth required
- Yes
- Published
- Mar 23, 2020
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-807
- Vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N
What happens
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.
What to do
- Apply the vendor's security update for Safety.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | safety |
< 1.9.0 |
1.9.0 |
pip install "safety>=1.9.0" |
| PyPI | safety |
< 1.8.7 |
1.8.7 |
pip install "safety>=1.8.7" |
Per OSV / GitHub Advisories (GHSA-7q25-qrjw-6fg2, PYSEC-2020-101). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| pyup | safety | ≤ 1.8.6 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Product Third Party Advisory
- github.com Mitigation Third Party Advisory
- pyup.io Vendor Advisory