Advisory

PYSEC-2020-101

Also known as: CVE-2020-5252, GHSA-7q25-qrjw-6fg2

Summary

The record has no summary.

Details

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.

Severity

Not rated by the source.

Dates

Published
2020-03-23 23:15 UTC
Modified
2023-11-08 04:03 UTC

Affected packages and fixes

safety

PyPI · All systems

Affected

  • introduced 0, fixed 1.8.7 (ecosystem)

Fixed versions

1.8.7

Fix

  • Fixed version 1.8.7
    pip install --upgrade safety==1.8.7

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences