Skip to content

← Public intelligence

PyPI package

safety

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

1 actionable advisory, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.0PyPIAmendedPublished

    Malicious package may avoid detection in python auditing

    CVE-2020-5252 · GHSA-7q25-qrjw-6fg2

    Affected
    • PyPI safety < 1.9.0
    Fixed in
    1.9.0· Vendor fix available
    Issue
    Python Auditing Vulnerability Demonstrates how a malicious package can insert a load-time poison pill to avoid detection by tools like Safety. Tools that are designed to find vulnerable packages can not ever run in the same python environment that they are trying to protect. Usage Install safety, insecure-package, and this package with pip in the same python environment. Order doesn&amp;#39;t matter. 1. pip install safety 2. pip install insecure-package 3. pip install dist/malicious-0.1-py3-none-any.whl Run the check 4. safety check You should see both Running my modified safety.check and that insecure-package is not listed in the results! How it Works Everything in Python is mutable. The trick is getting some code to run at interpreter load time in order to do some patching. 1. When you install this package, the setup.py settings installs a malicious.pth file to your site-packages directory. 2. The malicious.pth file gets loaded anytime Python starts, which in turn imports our…

    Recommended action: Upgrade to 1.9.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →