/

CVE-2026-48929

Severity:

HIGH RISK

(7.5)

Broken Access Control (CWE-287) in Rocket.Chat uploads

CVE-2026-48929

Analyzed

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-287

Impact:

Unauthenticated Arbitrary File Deletion

Severity:

HIGH RISK

(7.5)

CVSS version:

3.0

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Rocket.Chat contains an unauthenticated file deletion flaw where the deleteFileMessage Meteor method can be invoked without a valid user session.

An attacker who can connect over DDP WebSocket and guess or discover file IDs may permanently delete arbitrary uploaded files from storage and the database.

Affected context

The vulnerability occurs in Rocket.Chat deployments exposing the Meteor DDP WebSocket interface where the deleteFileMessage method is available.

It manifests when the application relies on Meteor.userId() to gate access, but the method continues execution even when this value is null for unauthenticated callers.

Public channels and file-sharing features that expose file identifiers through message payloads or download URLs further increase the practical risk surface, as they make file IDs discoverable without special privileges.

Exploit preconditions

  • Attack surface: Rocket.Chat DDP WebSocket endpoint exposing the deleteFileMessage Meteor method.
  • Required access: Network access to the Rocket.Chat server; no authenticated session is required.
  • Trigger point: An unauthenticated DDP method call to deleteFileMessage containing a targeted file ID.
  • Why exploitation is possible: The authorization logic relies on Meteor.userId() but does not enforce an early return or denial when it is null, allowing execution to fall through to FileUpload.getStore('Uploads').deleteById(fileID) without verifying ownership or permissions.

Why this happens

The root cause is an incomplete authentication and authorization check for a sensitive server-side method responsible for deleting uploaded files.

The implementation assumes that Meteor.userId() will be non-null and effectively trusted for permission checks, but it does not explicitly handle the unauthenticated (null) case, resulting in a fall-through path where the delete operation is executed unconditionally.

This aligns with CWE-287: Improper Authentication, as the system fails to properly verify that requests to delete files originate from an authenticated and authorized user, exposing privileged functionality to anonymous callers.

Potential impact

  • Attackers may permanently delete arbitrary uploaded files from Rocket.Chat storage.
  • Critical business records, shared documents, and media assets can be removed, affecting availability.
  • Disruption of team communications due to missing attachments in historical conversations.
  • Potential regulatory or compliance issues if required records are erased without trace.

General mitigation guidance

Mitigation efforts should focus on enforcing strict authentication and authorization checks for all state-changing server methods, especially those affecting file storage.

Patterns that help include:

  • Ensuring server-side methods explicitly reject requests when no authenticated user context is present, with early returns on null or invalid identities.
  • Applying consistent access control policies that verify both authentication and ownership/role-based permissions before performing file operations.
  • Centralizing authorization logic for file management APIs to avoid ad hoc checks and fall-through paths.
  • Limiting exposure of internal identifiers where possible and treating file IDs as sensitive references rather than public tokens.

How teams detect issues like this

Detection can rely on both preventive and retrospective techniques:

  • Static analysis or code review rules that flag Meteor methods and other RPC endpoints performing destructive actions without explicit authentication and authorization checks.
  • Policy enforcement in CI/CD pipelines requiring that all file manipulation paths call standardized authorization helpers.
  • Runtime monitoring and logging of delete operations, including user identity (or lack thereof), IP, and file ID, to identify anomalous unauthenticated deletions.
  • Periodic security reviews of WebSocket/DDP-exposed methods to ensure they adhere to the same access control standards as HTTP REST endpoints.

Sources

SourceLink
github.comgithub.com/RocketChat/Rocket.Chat/pull/40889/
hackerone.comhackerone.com/reports/3611837

Frequently asked

questions

Yes. Any party with network access to the Rocket.Chat DDP WebSocket endpoint can invoke the affected method and attempt file deletions without logging in.

No. The issue arises specifically because the deletion method does not require an authenticated user context, allowing calls when Meteor.userId() is null.

The safest approach is to enforce strict server-side authentication and authorization on every file deletion path, explicitly rejecting unauthenticated requests and verifying that the caller is permitted to delete the specific file.

Adopt a consistent access control framework for all server methods, mandate early checks for authentication and resource-level authorization, perform regular security reviews of WebSocket/RPC APIs, and use automated checks to flag any destructive action that lacks explicit permission validation.

Find out what's already
exploitable in your codebase.