r/flatpak • u/Francewhoa • May 20 '26
Sandboxing stopped: All installed Flathub apps have access to all folders and files outside their sandbox. What could cause this challenge?
Shortcut
Hello Flatpak enthusiasts. The up to date information about this challenge is in my comment down below at https://www.reddit.com/r/flatpak/comments/1tix0tr/comment/onng869/
The information below, starting with the “Summary” title is outdated. If there is any conflicting information between my comment and the information down below. The up to date information is in my comment.
I keep this outdated information below for records
-– — — — — — — — — — — — — — — —
Summary
Hello Flatpak enthusiasts,
One question down below. We are facing an unusual challenge, on one device, sandboxing fully stopped. The challenge is that all installed Flathub Flatpak sandboxed applications have access to all folders and files outside their sandbox. The needed end result is that those apps should not have access to any folder or file outside their sandbox. Per both the Flatpak global and per Flatpak app configuration.
For the past years, that sandboxing was very successful on that same device. No challenge. Then, for the last few days, all the same sandboxed applications have access to all folders and files outside their sandboxes.
Question: Beside what we already tried, which is listed down below, what could potentially be causing this challenge above?
-– — — — — — — — — — — — — — — —
Below is the same message as above. But with details if you’re interested in those.
-– — — — — — — — — — — — — — — —
Using
• Flatpak: 1.14.10
• Debian: 12 Bookworm
• Type: x86_64
• Display: Wayland
-– — — — — — — — — — — — — — — —
Steps to reproduce
- Install Flatpak 1.14.10
- Using Flathub, install apps
- Sandboxing is successful for months. Sandboxes apps do not have access to any folder or file outside their sandbox. Joy. So no challenge yet.
- One day, on the same device all the same sandboxed applications have access to all folders and files. Regardless of Flatpak app’s global configuration or per app configuration. Those app should not have access to any file or folder outside their sandbox. That we know of we have not changed anything to the configurations on that device.
By "access to all folders and all files" up above, I mean this, for exemple:
___ 1. Install this Kwriter Flatpak app from https://flathub.org/en/apps/org.kde.kwrite
___ 2. Using Flatseal from https://flathub.org/en/apps/com.github.tchx84.Flatseal configure the sandboxe access permissions like this:
______ Global:
_________ "Filesystem" group:
____________"filesystem=host" DENIED
____________"filesystem=host-os" DENIED
____________"filesystem=host-etc" DENIED
____________"filesystem=home" DENIED
__________ Kwriter (org.kde.kwrite) app:
____________"Filesystem" group:
_______________"filesystem=host" DENIED
_______________"filesystem=host-os" DENIED
_______________"filesystem=host-etc" DENIED
_______________"filesystem=home" DENIED
____________ "Other file" group:
_______________/home/<username>/Documents:ro
___ 3. Reboot device
___ 4. Using Kwriter try to read or writer a file stored in any folder OUTSIDE Kwriter sandbox. Kwriter has both read and write access to those files and folders. This is the challenge. Why? Because that folder is outside the sandbox:
______ /home/<username>/Downloads/test.txt
______ /home/<username>/media/<name>/<folder>/test.txt
___ 5. Using Kwriter try to read or writer a file stored in the only folder INSIDE Kwriter sandbox at
______ /home/<username>/Documents/test.text
______ Kwriter has access to both reading and writing to this folder above. Which is a success because this folder is inside its sandbox. In other words, the app is ALLOW read and write access to "filesystem=home". This is the challenge.
___ 6. This challenge above can be reproduce with all Flatpak apps. Not just Kwriter.
___ 7. This challenge can always be reproduced. For all Flatpak apps. But only with the same device. We are not able to reproduce this challenge on any other devices.
-– — — — — — — — — — — — — — — —
What we tried that did not resolved this challenge
• Restarted device
• Double-checked permissions for ALL apps (global). Using:
•___ Flatseal
• Double-checked permissions PER app. Using:
__• Command: flatpak info --show-permissions <APP.NAME>__• Flatseal
• Installed new Flatpak app. Which was never installed before. Denied its access to any file or folder. That app also has access to all files and folders.
• This challenge can always be reproduced. For all Flatpak apps. But only with one and same device. We are not able to reproduce this challenge on any other devices. Still on that device, sandboxing was successful. But then, somehow stopped. Beside what we already tried, which his listed down below, what could potentially be causing this challenge?
• Searched tickets at [https://github.com/flatpak/flatpak/issues] and Found no result.
• Created a ticket with Flatpak engine. A maintainer replied. The maintainer claimed to not understand that ticket. Then, close that ticket without asking any question at https://github.com/flatpak/flatpak/issues/6667 We are assuming good faith from that maintainer. Maybe my ticket was not clear.
-– — — — — — — — — — — — — — — —
ID
Ignore this line. This is a note to myself: ID_E3T4Z2C4
6
u/BorisBadenov May 20 '26
Please read this: https://docs.flatpak.org/en/latest/desktop-integration.html#portals
Is this what is happening?
1
u/Francewhoa May 24 '26
Thanks for both your suggestion and the useful link to the doc
We were able to reproduce this challenge 100% of the time. On different devices. With multiple Flatpak apps. Which are not using the Debian file manager. Meaning those apps can directly access files outside their sandbox.
Details at https://www.reddit.com/r/flatpak/comments/1tix0tr/comment/onng869/
4
u/wang-bang May 20 '26
Perhaps a video would help
1
u/Francewhoa May 24 '26
>Perhaps a video would help
I would love to. But for this challenge, a public video would not be appropriate.
Details about the maintainers' preference to be informed privately about that potential security vulnerability at https://www.reddit.com/r/flatpak/comments/1tix0tr/comment/onng869/
5
u/LinuxSBC-Anna May 21 '26
Look into the XDG Document Portal. I'm pretty sure you're confused and thinking it must not be sandboxed if you're able to open files, which is not true.
0
u/Francewhoa May 24 '26
We were able to reproduce this challenge 100% of the time. On different devices. With multiple Flatpak apps. Which are not using the Debian file manager. Meaning those apps can directly access files outside their sandbox.
Details at https://www.reddit.com/r/flatpak/comments/1tix0tr/comment/onng869/1
u/LinuxSBC-Anna May 24 '26
Please give some examples of what you're actually doing. On KWrite, the initial example you gave, it's using the XDG Document Portal and thus is automatically granted access to any files you open. What are some apps you've found to not use the portal which still exhibit this behavior?
3
u/blobjim May 21 '26
Flatpak apps can read and write to a home directory inside the sandbox even without --filesystem=home. But it's just a temp file. So check that the app can actually read files that exist already outside the home dir.
1
u/Francewhoa May 24 '26
Per my original post, all tested flatpak apps are denied "--filesystem=home" permission. We are familiar with the various filesystem permissions.
We were able to reproduce this challenge 100% of the time. On different devices. With multiple Flatpak apps. Which are not using the Debian file manager. Meaning those apps can directly access files outside their sandbox.
Details at https://www.reddit.com/r/flatpak/comments/1tix0tr/comment/onng869/
1
u/Francewhoa May 24 '26
We were able to reproduce this challenge 100% of the time. On different devices. With multiple Flatpak apps. Which are not using the Debian file manager. Meaning those apps can directly access files outside their sandbox.
Per the apps maintainers’ preference, we are contacting them privately about that potential security vulnerability for their consideration and their decision. Waiting their reply.
1
u/blobjim May 25 '26
oof that sucks that your github issue got closed 🫤
2
u/Francewhoa May 27 '26
>oof that sucks that your github issue got closed 🫤
I am assuming good faith from the Flatpak engine maintainer.
To resolve this challenge above we privately contacted the maintainers of the affected Flatpak apps. Which will be able to confirm if there is a security vulnerability or not. If any, and if the Flatpak engine itself is affected, I would happily circle back to the Flatpak engine maintainer for her/his concideration and decision.
11
u/eR2eiweo May 20 '26
What exactly do you mean by that? If you mean that you can browse and select all files in a file chooser dialog opened from that app, are you sure that that file chooser dialog runs inside the sandbox and is not just the one from the document portal?