Closed aslfv closed 1 year ago
If you believe, that something is a "major digital security risk", please report it to https://hackerone.com/nextcloud.
Currently running into the same problem. This needs to be fixed.
Hi,
thanks @aslfv for reporting the issue to h1 :+1:
On my test instance a suffix is automatically appended when a share with the same name already exist.
@yahesh do you have any idea why it's different on your instance?
@kesselb Could you try what happens when one sending user shares a subfolder with the same name to the same receiving user (e.g foldera/shared/
and folderb/shared/
)? That's what's happening in our case.
I shared admin/TestA/Contracts
and bob/TestB/Contracts
to alice and see both folders. bob's with a suffix.
I can confirm the issue:
An external folder named Photos, which is accessible by Alice and Bob. The structure is:
Photos
├── Holiday_1
│ └── Best
└── Holiday_2
└── Best
My workaround was, that Charly renames the first shared folder to Best-Holiday_1. Afterwards he can get the next share.
I would also call it a possible security issue. Maybe it only happens on external shares?
Hi,
Current status is that we don't know how to reproduce. If you observed something helpful, please let us know.
I can reproduce this as well. My installation is running the Nextcloud AIO (24.0.7) image with standard configurations, with the only exception being that the 'Shared' folder has a different default name. When one account shares a folder with a certain group, and another account shares a folder with the same name to the same group, the entire group will only see the new folder. That is to say, there are no suffixes added to either folder, it simply shows the most recent share.
I ran some tests to see when exactly a collision occurs that replaces an existing share. In the table below, the left column indicates that there is an existing shared folder with user Alice, by user Bob. This share can be personal, meaning Alice is the only recipient, it can be a share with a group that Alice is in, or both. The middle column indicates that Eve, a malicious user, shares a folder with the same name to Alice personally, or to a group that contains Alice. The right column shows when a collision occurs.
Alice is in a shared folder | Eve shares to | Collision |
---|---|---|
personal | personal | yes |
personal | group | yes |
group | personal | no |
group | group | yes |
personal, group | personal | yes |
personal, group | group | yes |
In the case where there is no collision, Alice does get an email notification about a new shared folder. Clicking the "Open >>Folder<<" button, opens Nextcloud, but fails to open the Folder itself.
Edit: I completely reinstalled Nextcloud-aio via docker and the issue still occurs.
Edit 2: It also happens on a fresh install of the latest docker image (v25). I really don't understand what's going on anymore, but at this point I don't think I can trust this software.
Having the same issue here, on a new Docker deployment of nextcloud-apache
25 sharing SMB mounts.
Thanks for your input :+1:
I will forward it accordingly.
This was solved in 25.0.3 and the matching 24 version
⚠️ This issue respects the following points: ⚠️
Bug description
When two or more (sending) users share a folder with the same (receiving) user, that receiving user will only see the folder of the latest (sending) user under the "shared" folder, without necessarily being aware of it. The other folders will only reappear if the receiving user renames the folder seen.
The issue was originally raised at https://help.nextcloud.com/t/shared-folder-with-same-name-starts-override-each-other-at-recipient-view/142574/3.
IMHO this is a critical bug, which could pose a major digital security risk that could be exploited to inject malicious files in another user's folder.
But irrespective of this, users that share their (default) folders should not have to worry about name collisions.
Steps to reproduce
1.Alice shares her "Document" folder with Charly => Charly sees Alice's "Document" folder 2.Bob shares his "Document" folder with Charly => Charly only sees Bob's "Document" folder. 3.Mallory shares his "Document" folder, which contains malware with Charly => Charly only sees Mallory's "Document" folder and may believe this is still Alice's Document folder.
Expected behavior
Charly should see all three folders: Alice's, Bob's and Mallory's "Document" folders, which may be renamed as "Document (Alice)", "Document (Bob)" and "Document (Mallory)" respectively.
Installation method
Community Docker image
Operating system
Fedora 36
PHP engine version
PHP 8.0
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Enabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response