Skip to content
Access control Disclosed report Intermediate CVE-2023-35173

End-to-end encrypted file-drops can be made inaccessible

An attacker who can obtain the metadata file of an end-to-end encrypted file drop can modify the entry for another user's uploaded file and upload a new metadata file, causing that file to become undecodable. This breaks the availability of the encrypted file.

rullzer Follow

Originally disclosed on HackerOne

Bounty$400 High 7.5 View original
  • Disclosed after 3 months

Summary by the program

Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-x7c7-v5r3-mg37

The report

Assume a filedrop that is send to 2 people, USER and ATTACKER

  1. user uploads their E2EE encrypted fileA into the filedrop
  2. All goes well
  3. Now ATTACKER comes along and wants mess up the upload from USER
  4. They obtain the metadatafile
  5. They modify the entry in the filedrop list that USER created
  6. They upload their new metadatafile
  7. Unlock it
  8. FileA is now not able to be decoded at all anymore.

Impact

The CIA model (Confidentiality, integrity and availability) is here very easy to break. An attacker can almost trivially in this case break the availability. Note that due to the nature of providing the metadatafile an attacker can trivially know if there are other filedrop files.

To solve

  1. Do not provide the metadata file to the user in file drop at all
  2. Only send back the new entry (which they can create without the metadatafile)
  3. Append the new entry in the backend code.

The original report as published on HackerOne, by rullzer. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the file drop provides the metadata file to users and accepts client-supplied metadata updates without server-side validation, allowing an attacker to alter another user's entry.

Impact

An attacker can trivially break the availability of another user's encrypted file, and can also learn whether other files exist in the file drop.

What the attacker needed

Access to a file drop shared with the attacker; ability to obtain the metadata file

The fix

The metadata file should not be provided to users in a file drop; instead, only the new entry should be returned and appended in the backend code.

How it was found

  1. A user uploads an end-to-end encrypted file into a file drop shared with two people.
  2. The attacker obtains the metadata file.
  3. The attacker modifies the entry in the file drop list that the user created.
  4. The attacker uploads the modified metadata file and unlocks it.
  5. The user's file can no longer be decoded.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

In an end-to-end encrypted file drop, the server stores encrypted files and a separate metadata file. If an attacker can get that metadata file, they can change the entry for someone else's file and upload their altered version. The original file then cannot be decoded.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by rullzer

View all

9 more disclosed reports, best first.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.