Patchfirst
CVE-2020-5252 Medium · 5.0 EPSS 0.4%

Malicious package may avoid detection in python auditing

Fix:upgrade safety to 1.9.0 or later Details ↓

pyupio · safety

Official description · CVE.org

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.

Breakdown
9.7 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Disclosed on 23 Mar 2020. No public exploit code or confirmed exploitation is recorded.

techniques

No techniques linked

No high- or medium-confidence techniques. The 1 available link are lower confidence and listed below.

Lower-confidence links (1)

These come from early or generic mappings, text matching, or contradict this CVE’s details (for example a public-facing technique on a bug that needs a user to open a file). Shown for completeness.

  • Exploit Public-Facing ApplicationT1190 needs user interaction; not a public-facing exploit

Affected versions and fixes

as published in the CVE record

pyupio safety

Affected: < 1.9.0

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: safety.

Upgrade to 1.9.0 or later

pippip install "safety>=1.9.0"

The first fix for CVE-2020-5252. No other CVE tracked by Patchfirst affects this package.

Affected versions

If you runUpgrade to
All versions before 1.9.01.9.0

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

References

3 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close