📈 GH Trending Explorer 🎲 Surprise me

← all repos

containers / bubblewrap

git clone https://github.com/containers/bubblewrap.git v0.13.1 · 8d ago

Low-level unprivileged sandboxing tool used by Flatpak and similar projects

+9
stars, 24h · #1,603
+~63
stars, 7 days · #2,025
+~270
stars, 30 days · #1,938
9.2k
★ total · +1% this week
400
forks · 207 open issues

Star history (as recorded here)

2026-10-20 · 9,140 ★ 2026-10-22 · 9,159 ★
LanguageC
License—
Created2016-02-16 (10y ago)
Last push8d ago
Watchers62
OwnerOrganization

GitHub topics

Links

README excerpt
Bubblewrap
==========
Many container runtime tools like `systemd-nspawn`, `docker`,
etc. focus on providing infrastructure for system administrators and
orchestration tools (e.g. Kubernetes) to run containers.
These tools are not suitable to give to unprivileged users, because it
is trivial to turn such access into a fully privileged root shell
on the host.
User namespaces
---------------
There is a feature in the Linux kernel called
user namespaces
which allows unprivileged users to use container features. Bubblewrap uses these to
build the sandbox, allowing any user to use the tool.
Historically, bubblewrap also supported a setuid mode for systems where
unprivileged user namespaces were not supported. However, this has been
removed.
The original bubblewrap code existed before user namespaces - it inherits code from
xdg-app helper
which in turn distantly derives from
linux-user-chroot.
System security
---------------
The maintainers of this tool believe that it does not, even when used
in combination with typical software installed on that distribution,
allow privilege escalation. It may increase the ability of a logged
in user to perform denial of service attacks, however.
In particular, bubblewrap uses `PR_SET_NO_NEW_PRIVS` to turn off
setuid binaries, which is the traditional way to get out of things
like chroots.
Sandbox security
----------------
bubblewrap is a tool for constructing sandbox environments.
bubblewrap is not a complete, ready-made sandbox with a specific security
policy.
Some of bubblewrap's use-cases want a security boundary between the sandbox
and the real system; other use-cases want the ability to change the layout of
the filesystem for processes inside the sandbox, but do not aim to be a
security boundary.
As a result, the level of protection between the sandboxed processes and
the host system is entirely determined by the arguments passed to
bubblewrap.
Whatever program constructs the command-line arguments for bubblewrap
(often a larger framework like Flatpak, libgnome-desktop, sandwine
or an ad-hoc script) is responsible for defining its own security model,
and choosing appropriate bubblewrap command-line arguments to implement
that security model.
Some aspects of sandbox security that require particular care are described
in the Limitations section below.
Users
-----
This program can be shared by all container tools which perform
non-root operation, such as:
 - Flatpak
 - rpm-ostree unprivileged
 - bwrap-oci
We would also like to see this be available in Kubernetes/OpenShift
clusters. Having the ability for unprivileged users to use container
features would make it significantly easier to do interactive
debugging scenarios and the like.
Installation
------------
bubblewrap is available in the package repositories of the most Linux distributions
and can be installed from there.
If you need to build bubblewrap from source, you can do this with meson:
 [code] 
Usage
-----
bubblewrap works by creating a new, completely em