//nefariousplan

CVE-2026-44716: Pipecat Calls This The Development Runner. There Is No Production Runner.

vendor

patterns

cve

proof of concept

Pipecat ships one HTTP runner. pip install pipecat-ai[runner] is the install extra; src/pipecat/runner/run.py is the file; the docstring at the top of that file calls it the development runner; the GHSA description filed under CVE-2026-44716 calls it the development runner. There is no other runner. The ESP32 walkthrough in the file's own docstring tells developers to start it with --host 192.168.1.100 because the embedded device on the same Wi-Fi has to reach the SDP-munging endpoint. The WebRTC examples tell them to add --folder <some-dir> if they want the prebuilt UI to serve recordings. CVE-2026-44716 is what GET /files/..%2F..%2Fetc%2Fpasswd does when both flags are set, before Daily's May 4 patch. The patch fixes the escape. It does not add authentication, change the wildcard CORS, or reconsider the docs that tell ESP32 developers to bind the runner to their LAN. The advisory calls this a development runner. There is no production runner.

The handler joined a string with pathlib and called it a sandbox

The pre-patch download handler lives at src/pipecat/runner/run.py inside _setup_webrtc_routes. Read it whole:

@app.get("/files/{filename:path}")
async def download_file(filename: str):
    """Handle file downloads."""
    if not args.folder:
        logger.warning(f"Attempting to dowload {filename}, but downloads folder not setup.")
        return

    file_path = Path(args.folder) / filename
    if not os.path.exists(file_path):
        raise HTTPException(404)

    media_type, _ = mimetypes.guess_type(file_path)

    return FileResponse(path=file_path, media_type=media_type, filename=filename)

Two things to notice before the path traversal.

First, the route is registered inside _setup_webrtc_routes unconditionally. Whether --folder is set, whether anything is going to be served, the endpoint exists as long as --transport webrtc is the active transport, which is the runner's default. The args.folder check runs at request time. Before the patch, a request that arrived without --folder configured logged the typo dowload and returned None. FastAPI serialised the None as null. The response was HTTP/1.1 200 OK with Content-Type: application/json and the literal four-byte body null. That is the discovery signature for "there is a Pipecat WebRTC runner here, and the operator did not set up a downloads folder."

Second, Path(args.folder) / filename is the pathlib join operator. Its documented job is to concatenate path segments; its documented behaviour is to return whatever the composition resolves to, with no containment check. The function name download_file and the surrounding if not os.path.exists(file_path) read as scoping. They are not.

Starlette kept %2F opaque. The :path converter decoded it

ASGI servers hand the URL path to the application URL-decoded except for %2F, which is preserved as the literal three-character sequence so the routing layer can distinguish a separator from a slash inside a single segment. Starlette's routing matcher walks the path-segment list against the route trie; literal ../ segments inside a real /-delimited URL are collapsed before any route map runs.

A request for /files/../etc/passwd, with literal slashes between the dot-dot and etc, is dot-segment-resolved away before any route matches it. The /files/ prefix is gone; the request 404s.

A request for /files/..%2F..%2Fetc%2Fpasswd is not. The ASGI path Starlette receives is /files/..%2F..%2Fetc%2Fpasswd with %2F preserved. The /files/{filename:path} route matches; the :path converter is greedy and captures the entire suffix as the single value of the filename parameter. The converter then runs URL-decoding on the captured string, including expanding %2F back to /. The handler is called with filename = "../../etc/passwd".

The handler joins that against args.folder:

file_path = Path("./recordings") / "../../etc/passwd"
# str(file_path) == 'recordings/../../etc/passwd'

pathlib does not resolve .. segments at join time; it returns the string composition. os.path.exists() then asks the operating system to walk the path, the OS resolves .. against the filesystem, /etc/passwd exists, the existence check passes. FileResponse(path=file_path, media_type=media_type, filename=filename) opens the file and streams it back, setting the user-controlled filename value as the Content-Disposition filename header.

The shape is gate-before-canonicalize. The gate is Starlette's segment-level dot-segment resolution, which runs against the wrapped representation where %2F is opaque. The canonicaliser is the :path converter's URL decoding, which runs against the captured parameter after routing has finished. The handler sees the unwrapped form the gate never inspected. The same primitive on the same substrate produced Nitro CVE-2026-44373 two months ago, where Nitro's radix3 router kept %2F opaque for routing and a downstream upstream decoded it before resolving against the filesystem. Pipecat collapses both halves into one process: the routing layer and the pathlib join run inside the same FastAPI worker, separated by exactly the function-call boundary the handler crosses to read its filename argument.

The patch adds the post-join check pathlib does not export

Commit e780f75, authored by Mark Backman at Daily on May 4, 2026, is the fix. The relevant diff:

+def _resolve_download_path(folder: str, filename: str) -> Path:
+    """Resolve a download path and ensure it stays within the downloads folder."""
+    allowed_base = Path(folder).resolve()
+    file_path = (allowed_base / filename).resolve()
+
+    if not file_path.is_relative_to(allowed_base):
+        raise HTTPException(status_code=403, detail="Access denied")
+
+    return file_path
+
+
 def _setup_webrtc_routes(app: FastAPI, args: argparse.Namespace):
     ...
     @app.get("/files/{filename:path}")
     async def download_file(filename: str):
         """Handle file downloads."""
         if not args.folder:
-            logger.warning(f"Attempting to dowload {filename}, but downloads folder not setup.")
-            return
+            logger.warning(f"Attempting to download {filename}, but downloads folder not setup.")
+            raise HTTPException(404)

-        file_path = Path(args.folder) / filename
-        if not os.path.exists(file_path):
+        file_path = _resolve_download_path(args.folder, filename)
+        if not file_path.exists():
             raise HTTPException(404)

         media_type, _ = mimetypes.guess_type(file_path)

-        return FileResponse(path=file_path, media_type=media_type, filename=filename)
+        return FileResponse(path=file_path, media_type=media_type, filename=file_path.name)

Three changes, in descending order of editorial weight.

_resolve_download_path resolves both the base directory and the joined path, then runs Path.is_relative_to(allowed_base) against the resolved-symlink form. That is the actual sandbox primitive pathlib's / operator is not. The shape matches the join-is-not-sandbox pattern's canonical fix, the same post-join verification that Casdoor's filepath.Join CVE-2026-6815 and DbGate's path.join CVE-2026-47669 reach for in Go and Node. The mistake is the same in every language that ships a join helper documented as a normaliser: developer reads it as scoping, framework defines it as composing, fix is resolve both sides and check containment.

The --folder unset branch returns HTTPException(404) instead of None. That closes the discovery oracle. After the patch, hitting /files/x without --folder configured returns a 404 indistinguishable from any other unknown path. The 200-with-null-body signature scanners read pre-patch is gone.

The typo dowload becomes download. The line shipped once and was never edited until the security fix. The PR's commit message names what it closes: fix: validate download path containment in runner. The audit was a security audit. The code that had the typo and the code that had the path traversal were touched in the same review, by the same developer, because the same code had not been read by anyone with the question "what does this endpoint serve to an unauthenticated caller" until the GHSA arrived.

The runner advertises Access-Control-Allow-Origin: *

The CORS middleware is configured in _configure_server_app, which runs before any transport-specific routes are mounted, regardless of which transport the operator picked:

def _configure_server_app(args: argparse.Namespace):
    """Configure the module-level FastAPI app with transport-specific routes."""
    app.add_middleware(
        CORSMiddleware,
        allow_origins=["*"],
        allow_credentials=True,
        allow_methods=["*"],
        allow_headers=["*"],
    )

allow_origins=["*"]. Every origin is permitted. The middleware sits in front of every route the runner ever registers, including the /files/{filename:path} handler the path-traversal fix lives in.

What that means for the bug:

A developer running python bot.py -t webrtc --folder ./recordings has the runner bound to localhost:7860. A second tab on the same machine, visiting any web page that ships JavaScript, can issue fetch("http://localhost:7860/files/..%2F..%2F..%2Fetc%2Fpasswd") against the developer's loopback. The browser forwards the request; Starlette's CORSMiddleware echoes the requesting origin into Access-Control-Allow-Origin (the legal substitution for * when the middleware is configured with allow_credentials=True); the page's JavaScript reads the response. The developer's /etc/passwd ends up in a variable inside a tab the developer did not consent to read it. Pre-patch, the same fetch reads any file the runner's process can read. Post-patch, the reachable filenames are bounded by --folder, and the rest of the chain is unchanged.

This is the OpenCode CVE-2026-22812 posture in mirror image. OpenCode's CVE was the CORS wildcard; the patch added an allowlist and left the unauthenticated shell endpoint intact. Pipecat's CVE is the path traversal; the patch adds containment and leaves the CORS wildcard and the missing authentication intact. The same pair of doors, two different vendors, each closing the door the CVE happened to name. A --allowed-origins flag was added by an outside contributor on June 11, five weeks after the security fix; the CORS middleware now reads args.allowed_origins or ["*"]. The default is still *. The contributor's commit message is Allow adding origin restrictions to WebSocket transports and the runner. The runner's docs do not yet recommend the flag in any of the canonical invocations.

ESP32 mode refuses to start on localhost

The ESP32 transport is the canonical reason a Pipecat developer binds the runner to anything other than localhost. The docstring at the top of run.py names the invocation directly:

- ESP32: `python bot.py -t webrtc --esp32 --host 192.168.1.100`

192.168.1.100 is on the developer's LAN. An ESP32 microcontroller sits next to the laptop on the same Wi-Fi; the device dials the runner over the LAN to receive WebRTC SDP offers and exchange RTP. A localhost-bound runner is not reachable from a separate device by definition. The ESP32 path requires an external interface.

The runner enforces this itself, inside main():

if args.esp32 and args.host == "localhost":
    logger.error("For ESP32, you need to specify `--host IP` so we can do SDP munging.")
    return

--esp32 plus the default --host localhost is rejected. The runner refuses to start. The developer's only path forward is to bind to an external interface. The interface they bind to is, in every example the project documents, a LAN IP.

The pre-patch consequence: python bot.py -t webrtc --esp32 --host 192.168.1.100 --folder ./recordings exposes /files/{filename:path} to every device on the LAN. A guest on the office Wi-Fi, the IoT camera firmware on the home Wi-Fi, the coworker's laptop two desks over, any of them can curl http://192.168.1.100:7860/files/..%2F..%2F..%2F.env and read the .env file the developer's bot loads its API keys from. The keys a Pipecat bot loads are not generic: an OPENAI_API_KEY with billing attached, an ANTHROPIC_API_KEY with billing attached, a DAILY_API_KEY that can create rooms in the developer's Daily account, a CARTESIA_API_KEY or ELEVENLABS_API_KEY paying for synthetic voice. The .env in a Pipecat project is the AI-agent keychain, and the path-traversal made it readable to anyone on Wi-Fi.

The post-patch consequence: the LAN device can still GET /files/<filename>, with no authentication, with the CORS wildcard intact, and the reachable filenames now bounded by --folder. Whatever the bot is currently writing to that folder, session transcripts, recordings, the audio of the call that just finished, is reachable. The architecture that put the runner on the LAN in the first place is unchanged.

The runner is the runner

Pipecat is an open-source framework. The framework is the bot library; the runner is the way Pipecat developers run their bots. The docstring's framing as a development runner is convention; nothing in the listener enforces it. The package extra is named runner. The README points at it for every walk-through. The project ships no other process for hosting a Pipecat bot. Developers who want a long-running production deployment migrate to Pipecat Cloud (which Daily, Pipecat's parent company, sells) or stand up their own ASGI server with their own auth; developers who are iterating locally use pipecat-ai[runner], which is the file the May 4 patch landed in.

The convention extends only as far as the developer's discipline. The CORS middleware is wildcard. The route is registered before the --folder check runs. The authentication is none. The --folder flag, the --host flag, and the --esp32 flag all expand the exposed surface; nothing contracts it. The patch closes one specific way that surface manufactures a path outside --folder. The surface itself is unchanged.

CVE-2026-44716 fixes a containment hole in a tool that has no containment by design. The fix is structurally correct; the join-is-not-sandbox post-join verification is the textbook answer. The bug class it closes (URL-decoding-after-routing producing an escape the routing layer's gate could not name) is the textbook gate-before-canonicalize shape. The patch is the fix the catalog expects. The runner the patch lives in is the runner the project's documentation, package layout, and ESP32 validation code all conspire to deploy onto the developer's LAN.

Patch: pipecat-ai/pipecat#4417

The advisory calls this a development runner. There is no production runner.