Hide download previews are accessible without a watermark
In Nextcloud Office, a read-only public share configured to hide downloads and show a watermark still displayed a close button that revealed the document preview without the watermark. An attacker or share recipient could use this to view the document without the intended watermark protection.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 31 days
- Disclosed after 6 months
Summary by the program
https://github.com/nextcloud/security-advisories/security/advisories/GHSA-92g2-h5jv-jjmg
The report
Initial report from https://github.com/nextcloud/richdocuments/issues/2561
Describe the bug The secure watermarked view announced for Nextcloud 25 / Hub 3 can be hacked. See reproduction steps below.
To Reproduce
- Go to Nextcloud Office Admin Settings and set the watermark options to have a custom watermark in read-only shares, without a download button.
- For example, create a read-only public share link without a download button.
- Go to the created public URL and see that there is as expected a watermark on the read-only document and no download button. For now, everything is OK.
- Then notice that there is the close document cross at the top right. IMO, this cross should not exist because when you click on it, the document reappears behind, without the watermark. Even though the document appears smaller, I think this is risky and goes against the privacy purpose of this feature shown in Berlin.
Expected behavior The close button should not appear at the top right in order to keep the recipient of the share captive in this view of the document. I go further in my explanation by saying that if the share is a single file share and not a folder share, the close button should never appear, because the share recipient is not supposed to access an upstream folder, but just be able to view the file (and edit it if he has write permission), nothing else.
Screenshots Here is the closing button :
Here is what we get after clicking on it :
Impact
While the download should be hidden and the watermark should get applied the preview is still visible without
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 viewer's close button was not removed for single-file read-only shares, so closing the watermarked view fell back to an unwatermarked preview.
What the attacker needed
Admin enables watermark on read-only shares; a read-only public share link exists; recipient opens the share and clicks close
The fix
The reporter suggests the close button should not appear for single-file read-only shares.
How it was found
- Configure the watermark for read-only shares without a download button in the admin settings.
- Create a read-only public share link without a download button.
- Open the public URL and confirm the watermark and absence of a download button.
- Click the close document cross at the top right.
- Observe the document reappearing without the watermark.
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.
A watermark is a visible mark placed over a document to discourage copying or leaking it. The software was meant to always show this mark on shared documents, but a close button let the viewer dismiss the marked view and see the plain document underneath.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.