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

High 7.5 Published Updated

Remote attackers can create, delete, or read arbitrary files via crafted session cookies in CherryPy, requiring an upgrade to secure the application.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2008-0252?

CVE-2008-0252 is a high-severity path traversal vulnerability in n/a, published on 12 Jan 2008. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Directory traversal vulnerability in the _get_file_path function in (1) lib/sessions.py in CherryPy 3.0.x up to 3.0.2, (2) filter/sessionfilter.py in CherryPy 2.1, and (3) filter/sessionfilter.py in CherryPy 2.x allows remote attackers to create or delete arbitrary files, and possibly read and write portions of arbitrary files, via a crafted session id in a cookie.

Weakness: CWE-22

Which versions are affected by CVE-2008-0252?

5 open source packages ship an affected version, including cherrypy. It affects 1 product.

PackageAffectedFixed in
cherrypy PyPIAll versions2.1.1, 3.0.2
cherrypy PyPIAll versions2.1.1
cherrypy PyPIAll versions2.1.1
cherrypy PyPIFrom 3.03.0.2
cherrypy PyPIFrom 3.03.0.2

Products include Cherrypy Cherrypy.

How do I fix CVE-2008-0252?

Upgrade cherrypy to a fixed version for your release line: 2.1.1 or 3.0.2.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2008-0252 being exploited?

There is no known exploitation of CVE-2008-0252 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2008-0252, DSA-1481-1, GHSA-76x8-gg39-5jjg, PYSEC-2008-3.

Is CVE-2008-0252 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free