Security

Upgopher provides useful controls, but the network and host remain part of the security boundary.

Security model

Upgopher shares one configured directory through HTTP. Filesystem operations validate that resolved paths stay within that directory, user paths in URLs remain encoded, and the application does not intentionally expose absolute host paths in browser-facing errors.

All application routes can be wrapped in one optional Basic Auth credential pair. This is suitable for small trusted deployments, not for multi-tenant authorization.

Network exposure

Default: the server binds to 0.0.0.0. Without Basic Auth, anyone who can reach the port can use the enabled operations.

For LAN use, apply host firewall rules if the network includes untrusted devices. For remote access, prefer a private VPN or a reverse proxy with trusted TLS and additional access controls. Do not assume an obscure port provides protection.

Basic authentication

upgopher -user admin -pass 'a-long-unique-password'

Both flags are required. The credential protects the application globally and is sent by the browser on requests after login. Basic Auth requires TLS when traffic crosses an untrusted network.

Secrets supplied as command arguments may be visible to other privileged users through process inspection. Use host-level isolation appropriate for your environment.

TLS options

# Local testing; clients will show a trust warning
upgopher -ssl

# Existing trusted certificate and key
upgopher -ssl -cert /run/secrets/fullchain.pem -key /run/secrets/privkey.pem

The automatically generated certificate is self-signed, in memory, and recreated on restart. It encrypts traffic but does not establish a trusted identity. Public deployments should use a trusted certificate, commonly through a reverse proxy.

Read-only mode

upgopher -dir /srv/public -readonly

Read-only mode blocks mutating operations exposed by Upgopher. It does not modify filesystem permissions or prevent another process on the host from changing files. Defense in depth means also mounting or granting the directory read-only when practical.

State and retention

Uploaded files remain in the shared directory. Clipboard text, clipboard images, clipboard tab metadata, and custom path aliases are process memory and disappear when Upgopher restarts. Clipboard content should therefore be treated as temporary, not durable or encrypted storage.

Temporary ZIP files are created in the operating system temporary directory while downloads are assembled and are removed after serving.

Report a vulnerability

Contact @gm_eduard privately with the affected version, reproduction steps, impact, and any suggested remediation. Please do not open a public issue before coordinating disclosure.