Privilege escalation in setuid mode via user namespaces in Bubblewrap
Bubblewrap (bwrap) before version 0.4.1, if installed in setuid mode and the kernel supports unprivileged user namespaces, then the `bwrap --userns2` option can be used to make the setuid process keep running as root while being traceable. This can in turn be used to gain root permissions. Note that this only affects the combination of bubblewrap in setuid mode (which is typically used when unprivileged user namespaces are not supported) and the support of unprivileged user namespaces. Known to be affected are: * Debian testing/unstable, if unprivileged user namespaces enabled (not default) * Debian buster-backports, if unprivileged user namespaces enabled (not default) * Arch if using `linux-hardened`, if unprivileged user namespaces enabled (not default) * Centos 7 flatpak COPR, if unprivileged user namespaces enabled (not default) This has been fixed in the 0.4.1 release, and all affected users should update.
- Published
- Mar 31, 2020
- Updated
- Jun 16, 2026
- EPSS
- 0.9% · 58th percentile
- CWE
- CWE-648
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
31
Monitor
Low priority for now.
- CVSS
- 31 / 40 · 7.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.9%
CNA vs NVD score
- NVD
- 7.8
- CNA · GitHub_M
- 7.2
- 0.6 point gap
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| projectatomic | bubblewrap | cpe:2.3:a:projectatomic:bubblewrap |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| archlinux | arch linux | cpe:2.3:o:archlinux:arch_linux |
| centos | centos | cpe:2.3:o:centos:centos |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- archlinux arch linuxall versions
- centos centos7.0
- debian debian linux10.0
- projectatomic bubblewrapbefore 0.4.1
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
containers bubblewrap
- < 0.4.1affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.11 | bubblewrap | before 0.4.1-r0 | 0.4.1-r0 |
| Debian:12 | bubblewrap | before 0.4.1-1 | 0.4.1-1 |
| openSUSE:Tumbleweed | bubblewrap | before 0.5.0-1.1 | 0.5.0-1.1 |
Same product
projectatomic: all recordsOther highest-scoring records for the same primary product.
- CVE-2017-5226When executing a program via the bubblewrap sandbox, the nonpriv session can escape to the parent session by using the TIOCSTI ioctl to push41Plan
- CVE-2019-12439bubblewrap.c in Bubblewrap before 0.3.3 misuses temporary directories in /tmp as a mount point.31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:bubblewrap | 0.4.1-r0 · Alpine:v3.11 | Package registry (OSV) |
| debian:bubblewrap | 0.4.1-1 · Debian:12 | Package registry (OSV) |
| opensuse:bubblewrap | 0.5.0-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-648 · Incorrect Use of Privileged APIsCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/containers/bubblewrap/commit/1f7e2ad948c051054b683461885a0215f1806240
- github.com/containers/bubblewrap/security/advisories/GHSA-j2qp-rvxj-43vj
Vendor advisories and official records. Exploit/PoC links are deliberately left out.