RocketChat / RocketChat/Rocket.Chat

File uploads not protected

Open
#23,390 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

File uploads are able to be downloaded by unauthenticated users even when "Protect Uploaded Files" is enabled

image

Steps to reproduce:
  1. Upload a file to any chat
  2. Get the link to the file (right-click > copy link address)
  3. Open the link in any browser without RC authentication (incognito)
Expected behavior:

Download should be blocked

Actual behavior:

File is downloaded

Server Setup Information:
  • Version of Rocket.Chat Server: 3.16.3
  • Operating System: Linux
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: NA
  • NodeJS Version: NA
  • MongoDB Version: NA
  • File Storage: S3
Client Setup Information
  • Desktop App or Browser Version: All / NA
  • Operating System: All / NA
Additional context

NA

Relevant logs:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the unauthenticated download using an uploaded chat file and the "Protect Uploaded Files" setting, then trace the file-link download path. Done means unauthenticated users are blocked while authenticated users can still download protected files.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.