Can download files on Android app without permission
A file owner could share a folder with download disabled, but the recipient could still save PDFs, documents and images through the Android app's viewer menus. This let a user obtain files the owner intended to keep non-downloadable.
- Triaged in 1 hour
- Fixed in 14 months
- Paid in 16 months
- Disclosed after 23 months
Summary:
If the owner of a file - of type PDF, document, image or presentation - shares it with a user and disable download, the user can still download it using the Android app.
Steps To Reproduce:
- As user1, in the "Files" app, create a folder containing files of different formats (PDF, .odt, .png, .odp...)
- Share the folder to user2 and uncheck "Allow download" (repeat this step twice as unchecking the box doesn't apply the first time)
- As user2, in the Android app, open: - a PDF: in the viewer click the top right menu, choose "Download as" and select "PDF document" or "PDF document as...". You receive a "Download completed" notification and can open and save the file on your phone. - a .odp: same as above - a .odt: same as above and you can also choose ".epub" - an image (.png, .jpg): choose "Use the image as" and "Wallpaper". The file will be saved in internal memory - not easily accessible but still. You can also choose the image as Whatsapp profile picture or contact photo
**Screenshots: **
**Additional notes on the tests: **
- What I could open but couldn't download: .mp3, .mp4, .txt
- What I couldn't open because it won't load (there's an infinite loader and a "Loading takes longer than expected" error ): .md, .csv
- Trying to export the document by clicking "File">"Save as" from the viewer (pdf /odt) will open a pop up to choose a filename, and after clicking "Save" there's an infinite loading icon which is blocking the UI.
Impact
Sensitive documents leak.
Context
Nextcloud is a self-hosted file sync and share platform. One of its sharing controls is a per-share permission that lets the owner of a file or folder share it with another user while disabling download. The intent is that the recipient can view the content but not take a copy of it.
The report looks at the Android client, package com.nextcloud.client, and shows that the download restriction is not enforced by the app for several file types. The owner shares a folder with download disabled, and the recipient still ends up with the file saved on the phone.
Setup
Two accounts are needed:
user1, the owner of the files.user2, the recipient of the share.
The owner uses the web "Files" app to create the share. The recipient uses the Nextcloud Android app. No special tooling is required beyond the two accounts and the mobile client.
The files used in the test cover several formats: PDF, .odt, .png, .odp, plus .jpg, .mp3, .mp4, .txt, .md and .csv for the additional checks.
Finding it
The share dialog offers an "Allow download" checkbox. When the owner unchecks it, the expectation is that the recipient can open the shared content in a viewer but cannot export it. In the Android app, the viewer for several formats exposes menu actions that write the file to local storage: "Download as" for documents, "Use the image as" for images. Those actions are not gated on the share permission, so the recipient can save a copy of content the owner explicitly marked as non-downloadable.
Exploitation
Step 1: create the shared content
As user1, in the "Files" app, create a folder containing files of different formats (PDF, .odt, .png, .odp and so on).
Step 2: share with download disabled
Share the folder to user2 and uncheck "Allow download". The report notes that this step has to be repeated twice, because unchecking the box does not apply the first time. The report notes that unchecking the box does not apply the first time.
Step 3: download from the Android app as the recipient
As user2, open the shared folder in the Android app and use the viewer actions per file type:
- PDF: in the viewer, click the top right menu, choose "Download as" and select "PDF document" or "PDF document as...". A "Download completed" notification appears, and the file can be opened and saved on the phone.
.odp: same as the PDF case..odt: same as above, and ".epub" is also offered as an export format.- Image (
.png,.jpg): choose "Use the image as" and then "Wallpaper". The file is saved in internal memory, which is not easily accessible but is still a copy on the device. The image can also be set as a WhatsApp profile picture or a contact photo.
Additional observations from the tests
The researcher also recorded what did and did not work:
| File type | Result |
|---|---|
.mp3, .mp4, .txt |
Could be opened but not downloaded |
.md, .csv |
Could not be opened: infinite loader and a "Loading takes longer than expected" error |
PDF / .odt via "File" > "Save as" in the viewer |
A pop up asks for a filename; after clicking "Save" an infinite loading icon blocks the UI |
So the bypass is not universal. It works through the viewer's own export and image-assignment actions, while the generic "Save as" path in the viewer fails.
Root cause
The download restriction is a property of the share. The Android app's viewer offers separate actions that produce a local copy: "Download as" for documents and "Use the image as" for images. Those actions produce a local copy even though the share has download disabled. The report does not include the code, so the exact location of the missing check is not shown; .
The "Allow download" checkbox also failing to apply on the first attempt is a separate defect in the sharing UI, and it makes the restriction harder to rely on even before the client bypass is considered.
Impact
Sensitive documents leak. A recipient of a share that the owner marked as non-downloadable can still save PDFs, .odt and .odp documents, and images to their phone, and can push images into third-party apps such as WhatsApp. The leak requires the recipient to have the share and to use the Android app; the report does not describe any way for an unrelated user to reach the files. The platform rated the issue low severity with a CVSS score of 3.2 and a bounty of 250 USD.
Fix
The report does not describe the fix that was applied. What the behaviour calls for is that the Android viewer's export and image-assignment actions check the share's download permission before producing a local copy, and that the "Allow download" checkbox apply on the first attempt rather than the second.
Variants to test
- Other clients: repeat the same share with download disabled and try the desktop client, the iOS app and the web interface's own viewers and export options. A positive result is any path that writes the file locally or hands it to another app.
- Other export formats: the
.odtviewer offered.epubin addition to PDF. Try every format the viewer offers for each document type, since each may take a different code path. - Image assignment targets: the report lists wallpaper, WhatsApp profile picture and contact photo. Try other system and third-party targets that accept an image, such as sharing intents, to see whether they also receive the file.
- Other share permissions: apply the same approach to shares restricted in other ways, for example read-only versus editable, and check whether the viewer actions respect those flags.
- The checkbox itself: on other share dialogs, toggle "Allow download" once and verify the resulting state from the recipient's side, to catch the same first-attempt failure elsewhere.
Hunting notes
This class of bug hides where a server-side permission is enforced on one path but the client offers alternative paths to the same content: viewers, export and "save as" menus, share-to-app intents, and media assignment actions. During recon, look for products with granular share permissions and a mobile or desktop client, and check whether each client action that produces a local copy is tied to the same permission as a normal download. The report's own additional notes are a useful signal: formats that could be opened but not downloaded, and formats that failed to load, show that enforcement is inconsistent across code paths, which is exactly where a bypass is likely to sit. The researcher walked through the recipient's exact menu actions for each affected format, showing the resulting "Download completed" notification and saved file.
What happened, in plain words
Nextcloud is a piece of software you can run on your own server to store files and share them with other people, a bit like running your own private version of Google Drive or Dropbox. When you share a file or folder with someone, Nextcloud lets you tick or untick a box called "Allow download". The idea is simple: if you untick it, the other person should be able to look at your file but not keep a copy of it.
This report shows that the promise does not hold in the Nextcloud Android app (the phone app, package com.nextcloud.client). The owner shares a folder with download switched off, and the person receiving the share can still save the files to their phone. It works for PDFs, .odt documents, .odp presentations and images. The app's built-in viewer offers menu options like "Download as" and "Use the image as" that create a local copy even though download is disabled.
The platform rated the issue low severity, with a CVSS score of 3.2 and a bounty of 250 USD.
Context
Nextcloud is a self-hosted file sync and share platform. "Self-hosted" means the software runs on a server that you or your organisation control, rather than on a company's cloud. "File sync and share" means it keeps files in one place and lets several people and devices see the same files.
One of its sharing controls is a per-share permission that lets the owner of a file or folder share it with another user while disabling download. A "permission" here is just a rule about what someone is allowed to do. "Per share" means the rule is set separately for each sharing arrangement, so the same folder could be shared with one person with download allowed and with another with download blocked.
The intent is that the recipient can view the content but not take a copy of it. Think of a reading room in a library: you may sit and read the book, but you may not photocopy it.
The report looks at the Android client, package com.nextcloud.client, and shows that the download restriction is not enforced by the app for several file types. "Client" means the program on the user's device that talks to the server. "Package" is the technical name Android uses to identify an app. "Not enforced" means the rule exists on paper but nothing actually checks it on that route. The owner shares a folder with download disabled, and the recipient still ends up with the file saved on the phone.
Setup
Two accounts are needed:
user1, the owner of the files.user2, the recipient of the share.
An account is simply a login on the Nextcloud server. Having two separate accounts is what makes the test realistic: one person owns the files, the other person is the guest who should only be allowed to look.
The owner uses the web "Files" app to create the share. The web "Files" app is the file manager you see in a browser when you log in to Nextcloud. The recipient uses the Nextcloud Android app. No special tooling is required beyond the two accounts and the mobile client. That matters for a beginner: this is not a test that needs hacking tools, proxy software or custom scripts. A browser, a phone with the app, and two logins are enough.
The files used in the test cover several formats: PDF, .odt, .png, .odp, plus .jpg, .mp3, .mp4, .txt, .md and .csv for the additional checks. A "format" is the kind of file, usually shown by the letters after the dot in the name. PDF is a fixed-layout document, .odt is a word-processor document, .odp is a presentation, .png and .jpg are images, .mp3 is audio, .mp4 is video, .txt is plain text, .md is Markdown (a lightweight text format), and .csv is a table of values separated by commas. Testing many formats matters because each format is usually opened by a different part of the app, and each of those parts can behave differently.
Finding it
The share dialog offers an "Allow download" checkbox. A "share dialog" is the window where you choose who to share with and what they may do. A "checkbox" is the small box you tick or untick to switch an option on or off.
When the owner unchecks it, the expectation is that the recipient can open the shared content in a viewer but cannot export it. A "viewer" is the part of the app that displays a file on screen, the way a photo app displays a picture or a PDF reader displays a document.
In the Android app, the viewer for several formats exposes menu actions that write the file to local storage: "Download as" for documents, "Use the image as" for images. "Local storage" means the phone's own memory, as opposed to the server. "Exposes menu actions" means these options are visible in the app's menus and can be tapped by the recipient.
The recipient can save a copy of content the owner explicitly marked as non-downloadable. "Gated on" means "checked against before being allowed". A useful comparison is a building with a locked front door but an open side window: the rule exists at the entrance, but another route into the same room was never checked.
Exploitation
Step 1: create the shared content
As user1, in the "Files" app, create a folder containing files of different formats (PDF, .odt, .png, .odp and so on).
Why this step: you need something worth protecting before you can test whether the protection works. Using a folder with several formats in one go means you can test many code paths with a single share, instead of repeating the whole setup for every file type.
Step 2: share with download disabled
Share the folder to user2 and uncheck "Allow download". The report notes that this step has to be repeated twice, because unchecking the box does not apply the first time. The report notes that unchecking the box does not apply the first time.
This is a separate defect from the main issue, but it makes the restriction harder to rely on.
Step 3: download from the Android app as the recipient
As user2, open the shared folder in the Android app and use the viewer actions per file type:
- PDF: in the viewer, click the top right menu, choose "Download as" and select "PDF document" or "PDF document as...". A "Download completed" notification appears, and the file can be opened and saved on the phone.
.odp: same as the PDF case..odt: same as above, and ".epub" is also offered as an export format.- Image (
.png,.jpg): choose "Use the image as" and then "Wallpaper". The file is saved in internal memory, which is not easily accessible but is still a copy on the device. The image can also be set as a WhatsApp profile picture or a contact photo.
Why each action matters:
- "Download as" is meant to convert or export the document into a file on the phone. If the owner said "no download", this option should not be there, or it should refuse.
- The "Download completed" notification is the proof: the app itself confirms that a copy now exists on the device.
- ".epub" is an e-book format. The fact that the
.odtviewer offers it shows there is more than one export route, and each route is a separate chance for the check to be missing. - "Use the image as" does not look like a download at all. It is a convenience feature: set this picture as your wallpaper, your contact photo, your WhatsApp profile picture. But to do that, the app must first have the image data on the phone. So a feature that seems unrelated to downloading quietly produces a local copy.
- "Internal memory" is storage that ordinary file-browsing apps cannot easily reach. It is less convenient for the attacker, but the copy still exists, and the report counts it as a leak.
Additional observations from the tests
The researcher also recorded what did and did not work:
| File type | Result |
|---|---|
.mp3, .mp4, .txt |
Could be opened but not downloaded |
.md, .csv |
Could not be opened: infinite loader and a "Loading takes longer than expected" error |
PDF / .odt via "File" > "Save as" in the viewer |
A pop up asks for a filename; after clicking "Save" an infinite loading icon blocks the UI |
An "infinite loader" is a spinning icon that never finishes, meaning the app is waiting for something that never arrives. "UI" stands for user interface, the parts of the screen you interact with; "blocks the UI" means the spinner sits on top and you cannot tap anything else.
So the bypass is not universal. It works through the viewer's own export and image-assignment actions, while the generic "Save as" path in the viewer fails. This is a useful lesson for beginners: when you test a restriction, try every route to the same content, and record the ones that fail as carefully as the ones that work. The failures tell you where the check does exist, and the successes tell you where it does not.
Root cause
The download restriction is a property of the share. "Server side" means the check happens on the central computer that stores the files, not on the phone. That is normally the strong place to put a check, because the user's device is under the user's control.
The Android app's viewer offers separate actions that produce a local copy: "Download as" for documents and "Use the image as" for images. Those actions produce a local copy even though the share has download disabled. "Client-side" means the check, or the lack of it, happens in the app on the phone. "Bypass" means getting around a rule without breaking it directly, like using the side window instead of the locked door.
The report does not include the code, so the exact location of the missing check is not shown; . "Fetch" simply means request and receive the data.
The "Allow download" checkbox also failing to apply on the first attempt is a separate defect in the sharing UI, and it makes the restriction harder to rely on even before the client bypass is considered.
Impact
Sensitive documents leak. A recipient of a share that the owner marked as non-downloadable can still save PDFs, .odt and .odp documents, and images to their phone, and can push images into third-party apps such as WhatsApp. "Third-party apps" are other programs on the phone, made by different companies, that can receive data from Nextcloud.
The leak requires the recipient to have the share and to use the Android app; the report does not describe any way for an unrelated user to reach the files. In other words, this is not a break-in from the internet. It is a failure to keep a promise made to the person you shared with. That is why the severity is low rather than critical, but it still matters whenever the whole point of the share was "look, do not copy".
CVSS is a standard scoring system for how serious a security flaw is; 3.2 sits in the low range.
Fix
The report does not describe the fix that was applied. What the behaviour calls for is that the Android viewer's export and image-assignment actions check the share's download permission before producing a local copy, and that the "Allow download" checkbox apply on the first attempt rather than the second.
In plain terms: every route that ends with the file on the phone should ask the same question, "is this share allowed to download?", and the answer should come from the server, not from the app's own assumption. And the checkbox should do what it says the first time it is clicked.
Variants to test
- Other clients: repeat the same share with download disabled and try the desktop client, the iOS app and the web interface's own viewers and export options. A positive result is any path that writes the file locally or hands it to another app. "Desktop client" is the Nextcloud program for Windows, macOS or Linux; "iOS app" is the iPhone version. Each client is separate software, so each can have its own gaps.
- Other export formats: the
.odtviewer offered.epubin addition to PDF. Try every format the viewer offers for each document type, since each may take a different code path. A "code path" is the sequence of instructions the program follows for a particular action; two menu items that look similar can run completely different code. - Image assignment targets: the report lists wallpaper, WhatsApp profile picture and contact photo. Try other system and third-party targets that accept an image, such as sharing intents, to see whether they also receive the file. A "sharing intent" is Android's standard mechanism for passing content from one app to another.
- Other share permissions: apply the same approach to shares restricted in other ways, for example read-only versus editable, and check whether the viewer actions respect those flags. "Read-only" means the recipient may look but not change; "editable" means they may change. A "flag" is a setting that is either on or off.
- The checkbox itself: on other share dialogs, toggle "Allow download" once and verify the resulting state from the recipient's side, to catch the same first-attempt failure elsewhere. "Toggle" means switch it on or off; "verify from the recipient's side" means log in as the other person and check what they can actually do, rather than trusting what the owner's screen shows.
Hunting notes
This class of bug hides where a server-side permission is enforced on one path but the client offers alternative paths to the same content: viewers, export and "save as" menus, share-to-app intents, and media assignment actions. "Class of bug" means a family of flaws that share the same underlying mistake. The mistake here is simple to state: the rule was applied at one door and forgotten at another.
During recon, look for products with granular share permissions and a mobile or desktop client, and check whether each client action that produces a local copy is tied to the same permission as a normal download. "Recon" is short for reconnaissance, the early phase of looking around a product to decide what is worth testing. "Granular" permissions are fine-grained ones, such as separate switches for view, edit and download, rather than a single on/off for everything.
The report's own additional notes are a useful signal: formats that could be opened but not downloaded, and formats that failed to load, show that enforcement is inconsistent across code paths, which is exactly where a bypass is likely to sit. Inconsistency is the clue. If one route says no and another route says yes to the same question, the second route is where you look.
The researcher walked through the recipient's exact menu actions for each affected format, showing the resulting "Download completed" notification and saved file. For a beginner, that is the main takeaway about writing up a finding: describe the exact taps, in order, and show the evidence that the copy exists. A clear reproduction is often worth more than a clever theory.
Glossary
- Account: a login on the Nextcloud server, identifying one person.
- Android app: the Nextcloud program installed on an Android phone.
- Bypass: getting around a restriction without breaking it directly, by using a route that was not checked.
- Checkbox: a small box in a dialog that is ticked or unticked to switch an option on or off.
- Client: the program on the user's device that talks to the server.
- Client-side: happening in the app on the user's device, rather than on the server.
- Code path: the sequence of instructions a program follows for a particular action.
- CSV: a plain-text table format where values are separated by commas.
- CVSS: a standard scoring system for the severity of a security flaw.
- Download: copying a file from a server to your own device.
- EPUB: an e-book file format.
- Export: producing a file in a chosen format from content shown in a viewer.
- Fetch: to request and receive data.
- Flag: a setting that is either on or off.
- Format: the kind of file, usually indicated by the letters after the dot in its name.
- Granular permissions: fine-grained settings, such as separate switches for view, edit and download.
- Infinite loader: a spinning icon that never finishes because the app is waiting for something that never arrives.
- Internal memory: phone storage that ordinary file-browsing apps cannot easily reach.
- JPG / PNG: common image file formats.
- Local storage: the device's own memory, as opposed to the server.
- Markdown (
.md): a lightweight plain-text format for writing with simple formatting marks. - MP3 / MP4: common audio and video file formats.
- ODP: a presentation document format.
- ODT: a word-processor document format.
- Package: the technical name Android uses to identify an app, here
com.nextcloud.client. - PDF: a document format with a fixed layout.
- Permission: a rule about what a user is allowed to do.
- Recon: short for reconnaissance, the early phase of examining a product to decide what to test.
- Recipient: the person a file or folder is shared with.
- Self-hosted: software that runs on a server you or your organisation control, rather than a vendor's cloud.
- Server-side: happening on the central computer that stores the data, not on the user's device.
- Share: an arrangement that gives another user access to a file or folder.
- Share dialog: the window where you choose who to share with and what they may do.
- Sharing intent: Android's standard mechanism for passing content from one app to another.
- Third-party app: a program on the phone made by a different company, which can receive data from Nextcloud.
- Toggle: to switch a setting on or off.
- UI: user interface, the parts of the screen you interact with.
- Viewer: the part of an app that displays a file on screen.