From 92591192278a23fa7f51841b2aae7e2ebec3dfb0 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Fri, 29 May 2026 17:39:29 +0300 Subject: [PATCH] docs: document security recommendations --- FAQ.md | 24 ++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 27 insertions(+) diff --git a/FAQ.md b/FAQ.md index f2bc1df1..9d836b28 100644 --- a/FAQ.md +++ b/FAQ.md @@ -119,6 +119,30 @@ As this is a simple basic authentication, if your browser doesn't show the promp `http://username:password@your_ytptube_url:port` +# Security recommendations + +YTPTube is designed for LAN and home-lab use behind a firewall or reverse proxy. The web interface and API are +unauthenticated by default because in a trusted network, auth adds friction without meaningful benefit. However, +if you expose YTPTube to the internet directly or via port forwarding **YOU MUST enable authentication**. + +### Without auth, anyone who can reach the API can: + +- Download arbitrary content through your IP and server. +- Delete or modify your downloaded files and database. +- Run arbitrary `yt-dlp` options, including `--exec`, which executes shell commands inside the container. + +This is not a vulnerability, it's the intended design. The `cli` field passes options directly to `yt-dlp`, +a tool that by design can execute commands. Auth is the mechanism that controls who gets to use that power. + +**If you expose YTPTube to untrusted networks**, do one of the following: + +1. **Enable authentication** — set both `YTP_AUTH_USERNAME` and `YTP_AUTH_PASSWORD`. +2. **Put it behind a reverse proxy** with its own authentication layer (see [Run behind reverse proxy](#run-behind-reverse-proxy)). +3. **Keep it on a private network** with no public exposure. + +YTPTube already gates other powerful features behind explicit opt-in: the built-in terminal, file browser actions and internal +URL requests for example. The `cli` field is no different, its power is by design, and access control is your responsibility. + # I cant download anything If you are receiving errors like: diff --git a/README.md b/README.md index 7e64ea19..b1c24c33 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,9 @@ Please read the [FAQ](FAQ.md) for more information. # Installation +> [!IMPORTANT] +> By default YTPTube runs without authentication. If you expose it to the internet, **enable auth**. See [security recommendations](FAQ.md#security-recommendations). + ## Run using docker command ```bash