Nextcloud · Report #1914115
End-to-end encrypted file-drops can be made inaccessible
Validstatus
highseverity
$400bounty
43upvotes
22 Jun 2023disclosed
Summary
Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-x7c7-v5r3-mg37
How it was found
Assume a filedrop that is send to 2 people, USER and ATTACKER
- user uploads their E2EE encrypted fileA into the filedrop
- All goes well
- Now ATTACKER comes along and wants mess up the upload from USER
- They obtain the metadatafile
- They modify the entry in the filedrop list that USER created
- They upload their new metadatafile
- Unlock it
- 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
- Do not provide the metadata file to the user in file drop at all
- Only send back the new entry (which they can create without the metadatafile)
- Append the new entry in the backend code.