A Download Link Should Not Expose Another Account's File

A Download Link Should Not Expose Another Account's File

MailBolt
MailBolt™ Team
Author
2026-11-04
Published
1 min read
Reading Time

An export filename includes a timestamp and an account number. That may make it look unique, but uniqueness is not authorization.

Protect the retrieval step

Check the authenticated user's current permission when a private download is requested. If the workflow uses a shareable download token, make its scope, lifetime and intended audience explicit. Do not rely on a difficult-to-guess filename as the only protection for account data.

Keep private exports outside ordinary public asset paths where possible, or use an equivalent server-enforced protection. Prevent an expired or cancelled link from continuing to return a cached private file.

Exercise the edge cases

With fictional accounts, try another user's identifier, an old link, a malformed path and a request after logout. Check both the application response and direct file access. Ensure failures do not reveal internal paths or contact contents.

Preserve a minimal audit of legitimate download generation and use according to your policy. The audit should not itself publish the secret token.

Creating a private file and serving a private file are two security decisions. Test both.

MailBolt
Written by
MailBolt™ Team