Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2020-5252

MEDIUM 5.0EPSS 23%

Malicious package may avoid detection in python auditing

Also known as GHSA-7q25-qrjw-6fg2, PYSEC-2020-101

Mitigation

  • Upgrade safety to one of 1.9.0, 1.8.7 (or later in the same release line).

Who should check

  • Projects that depend on PyPI package safety (< 1.9.0)
  • Anyone running pyupio safety < 1.9.0

Vulnerability facts

Affected
safety < 1.9.0
Fixed in
1.9.0, 1.8.7
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
5.0 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:N/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: High
  • Privileges required: High
  • User interaction: Required
  • Scope: Changed (impact reaches other components)
  • Confidentiality impact: None
  • Integrity impact: High
  • Availability impact: None
EPSS
0.37% chance of exploitation in 30 days (percentile 23, 2026-11-26)
CWE
CWE-807
Published
Modified

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 and fixed versions

Package / productAffectedFixedSource
PyPI safety< 1.9.01.9.0, 1.8.7osv
pyupio safety< 1.9.0—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2020-5252. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2020-5252.md
Affected: safety < 1.9.0
Fixed in: 1.9.0, 1.8.7

Steps:
1. Search this machine and project for safety (PyPI), pyupio safety: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2020-5252 being exploited?

There is no confirmed exploitation: CVE-2020-5252 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.37% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2020-5252?

Medium: CVSS 5.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2020-5252?

safety < 1.9.0.

Is there a fix for CVE-2020-5252?

Yes. Fixed in 1.9.0, 1.8.7. Upgrade safety to one of 1.9.0, 1.8.7 (or later in the same release line).

How do I check if I'm affected by CVE-2020-5252?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors