Download permissions can be changed by resharer
- Triaged in under an hour
- Fixed in 4 months
- Paid in 5 months
- Disclosed after 5 months
Summary by the program
Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-7w6h-5qgw-4j94
The report
The new feature in NC 25 to limit downloads also for internal shares is meant to force users to use secure view. So documents are watermarked and what not.
Assume a company wide share. People can share files from it to others but they can't be downloaded. For simplicity
- user1 shares a folder with reshare permissions but without download permissions to user2. Assume this is a share with ID 10
- user2 shares that folder with user3, this is a share with ID 11
This all works as expected
Now user2 simply does a PUT
curl -u user2:pass 'https://SERVER/ocs/v2.php/apps/files_sharing/api/v1/shares/11' -X PUT -H "OCS-APIREQUEST: true" -H 'Content-Type: application/json' --data-raw '{"permissions":"17","attributes":"[{\"scope\":\"permissions\",\"key\":\"download\",\"enabled\":true}]"}'
And there you go. No more pesky secure view. Just easy downloads for user3.
Impact
Secure view for internal shares is useless if also reshare permissions are given.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A medium-severity access control bug in nextcloud/server, rated CVSS 5.7. HackerOne made it public on 24 February 2023 as CVE-2023-25821. It paid $500.
About 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.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
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.