CVE-2026-44716
Path traversal in Pipecat's dev runner allows unauthenticated file read.
- CVSS 7.5
- CWE-22
- Input Validation and Sanitization
- Remote
Pipecat is an open-source Python framework for building real-time voice and multimodal conversational agents. From version 0.0.90 to before version 1.2.0, a path traversal vulnerability exists in Pipecat's development runner (src/pipecat/runner/run.py). When the runner is started with the –folder flag, it exposes a GET /files/{filename:path} download endpoint. The filename path parameter is concatenated directly onto args.folder with no containment check. Starlette normalises literal ../ sequences in URLs, but %2F-encoded slashes bypass this normalisation: the path parameter is URL-decoded after routing, so ..%2F..%2Fetc%2Fpasswd resolves to a path two levels above args.folder. An attacker with network access to the runner can read any file the pipecat process has permission to access — including SSH private keys, credentials, and system files — with a single unauthenticated HTTP request. This issue has been patched in version 1.2.0.
- CWE
- CWE-22
- CVSS base score
- 7.5
- Published
- 2026-06-10
- OWASP
- A01 Broken Access Control
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Path Traversal
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- Pipecat
- Fixed by upgrading
- Yes
Solution
Upgrade Pipecat to version 1.2.0 or later.
Vulnerable code sample
import os
import argparse
import uvicorn
from starlette.applications import Starlette
from starlette.responses import FileResponse, Response
from starlette.routing import Route
from starlette.requests import Request
# This handler represents the vulnerable code from src/pipecat/runner/run.py
async def download_file(request: Request):
# The base folder is taken from the command-line arguments.
base_folder = request.app.state.folder
# The filename is taken directly from the URL path.
filename = request.path_params['filename']
# VULNERABILITY: The untrusted 'filename' is directly joined with the
# base folder path without any sanitization or containment checks.
# An attacker can use URL-encoded path traversal sequences like '..%2F'
# to access files outside the intended 'base_folder' directory.
file_path = os.path.join(base_folder, filename)
if os.path.isfile(file_path):
return FileResponse(file_path)
return Response("File not found", status_code=404)
# This block simulates the runner's setup process.
if __name__ == "__main__":
parser = argparse.ArgumentParser()
# The '--folder' flag is required to expose the vulnerable endpoint.
parser.add_argument("--folder", default=".", help="Path to the folder to serve files from")
args = parser.parse_args()
app = Starlette(routes=[
Route("/files/{filename:path}", download_file, methods=["GET"]),
])
# The folder path is stored in the application state, accessible by the handler.
app.state.folder = os.path.abspath(args.folder)
uvicorn.run(app, host="0.0.0.0", port=8000)Patched code sample
import os
from fastapi import FastAPI
from starlette.responses import Response, FileResponse
# This is a simplified representation. In the actual code, `args` would
# come from command-line arguments (e.g., argparse).
class Args:
folder: str
args = Args()
args.folder = "/path/to/web/files" # Example base directory
app = FastAPI()
@app.get("/files/{filename:path}")
async def get_file(filename: str):
# IMPORTANT: Sanitize the filename to prevent path traversal.
# We do this by ensuring the resolved path is inside args.folder.
try:
# Get the real, canonical path for the base directory
base_dir = os.path.realpath(args.folder)
# Get the real, canonical path for the requested file
requested_path = os.path.realpath(os.path.join(base_dir, filename))
except ValueError:
# os.path.realpath can raise ValueError on Windows for invalid paths
return Response("Invalid path", status_code=400)
# Check if the resolved requested path is still within the base directory
if not requested_path.startswith(base_dir + os.sep) and requested_path != base_dir:
return Response("Invalid path", status_code=400)
# Check if the path exists and is a file
if not os.path.exists(requested_path) or not os.path.isfile(requested_path):
return Response("Not Found", status_code=404)
return FileResponse(requested_path)Payload
curl http://<target-ip>:<port>/files/..%2F..%2F..%2F..%2F..%2Fetc%2Fpasswd
Cite this entry
@misc{vaitp:cve202644716,
title = {{Path traversal in Pipecat's dev runner allows unauthenticated file read.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-44716},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-44716/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
