Self-hosting
Security
What FuzzyShare protects, the known limits, and how to report a vulnerability.
Reporting a vulnerability#
Do not open a public issue for a security problem. Use GitHub's private vulnerability reporting (the Security tab, then Report a vulnerability) on the repository. Include what you found, how to reproduce it and the impact. You should get a first reply within a few days. Only the latest release receives fixes.
What FuzzyShare protects#
- Access keys are stored as SHA-256 hashes. A copy of the data directory does not reveal anyone's key. A key is shown once and cannot be recovered.
- Files are private to their owner. Every path is scoped to the owner's id, and names are limited to letters, digits,
.,_and-, so there is no path traversal. - Share tokens are 256 bits of randomness, stored only as hashes (public links keep the token so the owner can copy it again), and tied to one version of one file.
- Public links are read-only and immutable.
GETandHEADonly. Replacing or deleting the file revokes them.FUZZY_ALLOW_PUBLIC=falsedisables them. - Private links need proof. A private link answers
401with no name, size or type until the reader presents the passphrase or an allowed key. Passphrases are stored as PBKDF2-HMAC-SHA256 (600,000 iterations, random 16-byte salt) and compared in constant time. Wrong guesses are limited to 5 per link and address per 10 minutes, and the number of concurrent hashes is capped. Browsers unlock once and carry a signed, 10-minute,HttpOnly,SameSite=Strictcookie scoped to that link. - Download limits are race-free. Counting happens under the store lock, so two readers cannot take the last download.
- Uploaded HTML cannot reach the app. It is served with a CSP
sandbox(noallow-same-origin) and shown in a sandboxed iframe, so it cannot read a viewer's stored key or call the API as them. - Previews build DOM nodes rather than inserting file contents as HTML.
- Limits are enforced by the program: 14 days per file and 1 GB per person cannot be raised by configuration.
- The admin key is compared in constant time. It manages accounts and has no access to anyone's files, keys or link activity.
Link activity#
Each link's log is readable only by the link's owner. It records time, event kind, IP, the first 200 characters of the user agent and an opaque session id, plus the account id and name only if the visitor presented their own key. It never records which key was used. Details and operator choices are on Access activity and privacy.
Known limits#
- Plain HTTP. FuzzyShare does not terminate TLS. Run it behind an HTTPS proxy. See HTTPS and reverse proxies.
- Uploaded content shares the site's origin. The sandbox stops a hostile page from stealing keys, but a shared page can still imitate a login form. If you host FuzzyShare for the public, consider serving share links from a separate domain.
- Registration is open by default. Anyone who can reach the server can create an account. Set
FUZZY_SIGNUP_CODEto close it, and keepFUZZY_SIGNUPS_PER_HOURlow. The rate limit is in memory and per address. - The passphrase limit is in memory. It resets when the server restarts and is per address. Behind a proxy set
FUZZY_TRUST_PROXY=true. - A key presented to a private link is sent to this server. Only its fingerprint is compared and nothing is stored, but present it only to a FuzzyShare you trust.
- Lost keys cannot be recovered. The admin removes the account and the person registers again.
- Request bodies have no read timeout, so large uploads can be slow. Use a proxy with timeouts on hostile networks.
- No antivirus or content scanning. FuzzyShare stores and serves what it is given.