CVE-2008-0252: Directory Traversal Vulnerability in CherryPy

cherrypy Updated 02 Oct 2025

Summary

12/01/2008
Yes i
High
7.5

CVE-2008-0252: 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 r... Affects cherrypy across 2 version ranges.

< 2.1.1 >= 3.0, < 3.0.2

Fixed in 2.1.1 or 3.0.2, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2008-0252 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

CherryPy is a Python web framework that allows developers to build web applications. It provides a simple and efficient way to handle HTTP requests and responses. The framework is widely used and has a large user community. However, versions 2.x and 3.0.x up to 3.0.2 of CherryPy are vulnerable to a directory traversal vulnerability.

Vulnerability Detail

The vulnerability exists in the _get_file_path function in the sessions module of CherryPy. It allows remote attackers to manipulate session IDs in cookies to create or delete arbitrary files. Additionally, it may enable them to read and write portions of arbitrary files on the server. This can lead to unauthorized access, data leakage, and potential compromise of the web application and server.

How To Fix

Latest published version: 18.10.0 as of 23 Oct 2026

pip install --upgrade "cherrypy==18.10.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.1.1 2.1.1
    pip install --upgrade "cherrypy==2.1.1"
  • >= 3.0, < 3.0.2 3.0.2
    pip install --upgrade "cherrypy==3.0.2"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading to a fixed version is not immediately possible, a temporary workaround is to disable the use of session cookies in the CherryPy configuration. This can be achieved by modifying the configuration file or code to remove or comment out the session-related settings. However, this workaround may impact the functionality of applications relying on session management.

Conclusion

The directory traversal vulnerability in CherryPy can be mitigated by upgrading to a fixed version or applying a temporary workaround. It is crucial to take prompt action to protect the web application and server from potential unauthorized access and data leakage. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for cherrypy →

Share this vulnerability

FAQ

CherryPy is a Python web framework that simplifies the development of web applications by providing an efficient way to handle HTTP requests and responses.

Versions 2.x and 3.0.x up to 3.0.2 of CherryPy are affected by this directory traversal vulnerability.

The vulnerability allows remote attackers to create or delete arbitrary files and potentially read and write portions of arbitrary files on the server. This can lead to unauthorized access, data leakage, and compromise of the web application and server.

To fix this vulnerability, it is recommended to upgrade to a fixed version of CherryPy, specifically version 2.1.1 or version 3.0.2.

Yes, a temporary workaround is to disable the use of session cookies in the CherryPy configuration. However, this may impact the functionality of applications relying on session management.

Related vulnerabilities

Recent vulnerabilities recorded for cherrypy.

How To Fix

Latest published version: 18.10.0 as of 23 Oct 2026

pip install --upgrade "cherrypy==18.10.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.1.1 2.1.1
    pip install --upgrade "cherrypy==2.1.1"
  • >= 3.0, < 3.0.2 3.0.2
    pip install --upgrade "cherrypy==3.0.2"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback