Miggo Logo

CVE-2020-5252: Malicious package may avoid detection in python auditing

5

CVSS Score
3.1

Basic Information

EPSS Score
0.21648%
Published
3/24/2020
Updated
10/21/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:N/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
safetypip< 1.9.01.9.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability relies on patching Safety's core check function at runtime. The proof of concept demonstrates direct modification of safety.check to filter out 'insecure-package'. The attack vector (via .pth file loading) exploits Python's mutable runtime environment to subvert Security Decision mechanisms (CWE-807). The check function is explicitly targeted in the malicious init.py code shown in advisories, making it the clear vulnerable entry point.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

# Pyt*on *u*itin* Vuln*r**ility **monstr*t*s *ow * m*li*ious p**k*** **n ins*rt * lo**-tim* poison pill to *voi* **t**tion *y tools lik* S***ty. Tools t**t *r* **si*n** to *in* vuln*r**l* p**k***s **n not *v*r run in t** s*m* pyt*on *nvironm*nt t**

Reasoning

T** vuln*r**ility r*li*s on p*t**in* S***ty's *or* ****k *un*tion *t runtim*. T** proo* o* *on**pt **monstr*t*s *ir**t mo*i*i**tion o* s***ty.****k to *ilt*r out 'ins**ur*-p**k***'. T** *tt**k v**tor (vi* .pt* *il* lo**in*) *xploits Pyt*on's mut**l*