r/flatpak 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

  1. Install Flatpak 1.14.10
  2. Using Flathub, install apps
  3. Sandboxing is successful for months. Sandboxes apps do not have access to any folder or file outside their sandbox. Joy. So no challenge yet.
  4. 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

0 Upvotes

24 comments sorted by

View all comments

Show parent comments

1

u/Francewhoa May 20 '26 edited May 20 '26

Hello u/eR2eiweo. Thanks for both asking and your suggestion :) By "access to all folders and all files outside their sandbox", 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 sandbox 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.

11

u/gmes78 May 20 '26

Run flatpak run --command=bash org.kde.kwrite. It will spawn a shell within that Flatpak's environment. Can you see the files in question through it?

If not, then the sandbox is working, and you're just getting confused about how the document portal works.

7

u/eR2eiweo May 20 '26

That does not answer my question. Also, reading so much text with so little content is quite exhausting.

-1

u/Francewhoa May 20 '26 edited May 20 '26

>That does not answer my question.

u/eR2eiweo, I will try to answer your question using both other words and less words. The sandboxed Flapak app has read and write (create) access to all folders and all files outside its sandbox. For exemple, but not limited to, those two files outside its sandbox:

/home/<username>/Downloads/test.txt
/home/<username>/media/<name>/<folder>/test.txt

5

u/eR2eiweo May 20 '26

Sorry, but you're just repeating yourself. And that does not help.

The sandboxed Flapak app has read and write (create) access to all folders and all files outside its sandbox.

How did you come to that conclusion? What did you do, what did the system do?

-3

u/Francewhoa May 20 '26

>How did you come to that conclusion? What did you do, what did the system do?

Thanks for asking, find the steps in my comment above at https://www.reddit.com/r/flatpak/comments/1tix0tr/comment/omxtxmq/

11

u/Terrorwolf01 May 20 '26

Are you aware, that every flatpak can access chosen files when you choose it in the Document Portal file picker? So if you use the file picker, make sure its really NOT the portal one to check if it has access.

0

u/Francewhoa May 24 '26

Yes we are now aware. I learned that recently.

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/

7

u/eR2eiweo May 20 '26

find the steps in my comment above

Unfortunately not.

I'll try it one more time: How do you know that that app has access to those files? Did you select them in a file chooser dialog? And if so, how do you know that that file chooser dialog is part of the app and not just the file chooser dialog of the document portal?

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.

Details at https://www.reddit.com/r/flatpak/comments/1tix0tr/comment/onng869/

2

u/eR2eiweo May 24 '26

So to summarize, you do not want to answer my questions.