Miggo Logo

CVE-2008-0252:
CherryPy Malicious cookies allow access to files outside the session directory

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.85249%
Published
5/1/2022
Updated
9/13/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
cherrypypip>= 0, < 2.1.12.1.1
cherrypypip>= 3.0, < 3.0.23.0.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the _get_file_path function in both 3.0.x (lib/sessions.py) and 2.x (filter/sessionfilter.py) implementations. The GitHub patch shows the 3.0.x version added a critical os.path.normpath check to prevent directory traversal, confirming the original function lacked this validation. CVE/GHSA descriptions explicitly name these files/functions, and the vulnerability type (CWE-22) directly maps to insecure path construction using untrusted input (session IDs). The 2.x equivalent in sessionfilter.py is inferred to have the same flaw based on vulnerability descriptions covering both major versions.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*ir**tory tr*v*rs*l vuln*r**ility in t** _**t_*il*_p*t* *un*tion in (*) `li*/s*ssions.py` in ***rryPy *.*.x up to *.*.*, (*) `*ilt*r/s*ssion*ilt*r.py` in ***rryPy *.*, *n* (*) `*ilt*r/s*ssion*ilt*r.py` in ***rryPy *.x *llows r*mot* *tt**k*rs to *r**t

Reasoning

T** vuln*r**ility st*ms *rom t** _**t_*il*_p*t* *un*tion in *ot* *.*.x (li*/s*ssions.py) *n* *.x (*ilt*r/s*ssion*ilt*r.py) impl*m*nt*tions. T** *it*u* p*t** s*ows t** *.*.x v*rsion ***** * *riti**l os.p*t*.normp*t* ****k to pr*v*nt *ir**tory tr*v*rs*