#102 inbox-dir symlink into www exposes private submissions

closedkind:securityopened
details
updated
id
fb59a187-80c0-4c80-a6f9-3de604f9843d

What

ensure_inbox_outside_www() only compares lexical paths; serve static file lookup follows symlinks inside www.

src/serve.rs:175-186.

Reproduced

mkdir -p /tmp/www/private
ln -s /tmp/www/private /tmp/inbox-link
hu13 serve --www /tmp/www --inbox-dir /tmp/inbox-link --listen 127.0.0.1:39332
curl http://127.0.0.1:39332/private/leak.json

Startup succeeds (the inbox path is lexically outside /tmp/www), and the file is served with 200. Actual inbox submissions written through the symlink land inside the served tree.

Impact

Violates the explicit “inbox must never be served” invariant; private submissions can be exposed.

Fix

Comments (1)

all issues