Bubblewrap (bwrap) is the low-level sandboxing tool that lets an unprivileged user run a program inside a locked-down view of the filesystem. It creates a brand-new mount namespace whose root is an empty tmpfs invisible from the host, and then hands you a small set of options — --bind, --ro-bind, --tmpfs, --dir, --symlink, --proc, --dev — with which you assemble exactly the parts of the system the sandboxed process is allowed to see. Anything you do not bind simply does not exist inside: no /home, no /etc/shadow, no host PIDs, no network unless you keep it.
It is deliberately not a complete sandbox with a fixed policy. Bubblewrap is the mechanism; whatever constructs the command line — Flatpak, rpm-ostree unprivileged, libgnome-desktop, sandwine or your own shell script — is the thing that defines the security model. That split is why the code is small and auditable: a single C program of a few thousand lines, built with meson, developed by Alexander Larsson and now maintained by Simon McVittie and contributors in the containers/bubblewrap repository at github.com/containers/bubblewrap (C, LGPL, actively maintained — 0.13.1 landed on 14 October 2026). It is the sandbox engine underneath millions of Flatpak installs, and it is packaged in every major distribution as bubblewrap.
--ro-bind /usr /usr shares a read-only copy of the host tree, --bind shares it writably, --tmpfs /tmp gives a private temporary directory, --dir and --symlink synthesise the layout a dynamically linked binary expects. Injections are mounted nodev by default.--unshare-all (plus --share-net when the sandbox still needs the network). A sandboxed --unshare-all run sees only lo and a handful of processes, not the host’s 250+.PR_SET_NO_NEW_PRIVS, which disables setuid binaries (the traditional escape from a chroot) and makes seccomp filters usable by an unprivileged process.--unshare-pid bubblewrap runs a trivial init inside the sandbox to reap orphaned children, sidestepping the classic “PID 1 zombie reaping” problem; --as-pid-1 hands that role to your own command.--seccomp FD loads a BPF filter to restrict which syscalls the sandbox may make, while --new-session protects against terminal-injection (TIOCSTI, CVE-2017-5226) and --die-with-parent guarantees the sandbox dies with its parent.xdg-dbus-proxy filtering, and seccomp restrictions can conflict with browsers that apply their own filters.The usual alternatives require trust in a setuid root binary, and that is a large amount of privilege to hand to a sandbox front-end. Bubblewrap takes the opposite approach: a small program, no setuid, kernel user namespaces doing the isolation, and privilege escalation inside the sandbox switched off with NO_NEW_PRIVS. The result is a component that is tractable to audit and easy to reason about. It is also composable rather than opinionated — because the caller chooses the mounts, the same binary serves wildly different jobs, from “strong security boundary around an untrusted app” to “run this build with a different filesystem layout”, without either case inheriting policy it did not ask for. And the ecosystem argument is the strongest one at scale: Flatpak, rpm-ostree and desktop portals already build on it, so sandbox behaviour is consistent and battle-tested rather than bespoke.
/tmp, no network and a filesystem that cannot be scribbled on outside a chosen work directory.bwrap --unshare-all --die-with-parent so a failure cannot reach outside the sandbox.Linux only — it depends on mount, PID, IPC, UTS, network and user namespaces plus seccomp, all kernel features. A modern kernel with unprivileged user namespaces enabled is required (the setuid fallback is gone). It has no daemon, no GUI and no runtime dependencies beyond libc and libcap; it builds from source with meson (meson setup _builddir && meson compile -C _builddir) and is packaged for Debian and Ubuntu (bubblewrap, 0.12.0 in Debian 13), Fedora/RHEL, Arch, Alpine and openSUSE. On distributions that restrict unprivileged user namespaces through AppArmor or a sysctl, the sandbox will need that restriction relaxed — which is exactly why Flatpak’s own 0.12+ builds may request the bwrap capability profile.
Free and open source. Bubblewrap is released under the GNU Lesser General Public License, version 2.1 or later — the repository’s COPYING file carries the LGPL 2.1 text and the source files declare SPDX-License-Identifier: LGPL-2.0-or-later; Debian’s packaging records the licence as LGPL-2.1+. Source, releases and the issue tracker are at github.com/containers/bubblewrap; the Linux man page (man bwrap) ships with the package and documents every option.