
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-40226 is a container escape vulnerability in systemd-nspawn that allows an attacker with high privileges to break out of the container environment and execute code on the host system via a crafted optional configuration file. It affects systemd versions 233 through 259 (before 260), with fixed backport releases at 257.12, 258.6, and 259.4. The vulnerability was published on April 10, 2026, and was originally reported via the YesWeHack bug bounty platform (YWH-PGM9780-116). It carries a CVSS v3.1 base score of 6.4 (Medium) (GitHub Advisory, systemd Advisory).
The root cause is classified as CWE-348 (Use of Less Trusted Source): systemd-nspawn optionally reads configuration files that can be downloaded alongside container images and stored in privileged directories. Two parsing bugs affect the handling of the PivotRoot=, BindUser=, and Ephemeral= options in these .nspawn config files. When a malformed or crafted config file is processed, the container is spawned on the host's root filesystem instead of the container image, effectively bypassing container isolation with high privileges. Exploitation requires local access and high privileges (e.g., the ability to place or influence a .nspawn config file in a directory automatically scanned by nspawn), making the attack complexity high (systemd Advisory, Red Hat Bugzilla).
Successful exploitation allows a high-privileged attacker to escape the systemd-nspawn container and gain access to the host root filesystem with elevated privileges. This results in high impact to confidentiality, integrity, and availability of the host system — an attacker could read sensitive host data, modify system files, disrupt services, or use the host as a pivot point for further lateral movement within the infrastructure (systemd Advisory, GitHub Advisory).
There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation as of the time of reporting. The EPSS score is approximately 0.006% (1st percentile), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation is constrained by the requirement for local access and high privileges, significantly limiting the attacker pool (GitHub Advisory, systemd Advisory).
.nspawn configuration files (e.g., /etc/systemd/nspawn/ or alongside the container image)..nspawn config file to include malformed values for PivotRoot=, BindUser=, or Ephemeral= options that trigger the parsing bug..nspawn configuration files in /etc/systemd/nspawn/ or container image directories, particularly those containing PivotRoot=, BindUser=, or Ephemeral= directives with unusual or empty values.systemd-nspawn./etc/, /root/, /usr/) by processes associated with a container workload.Upgrade systemd to one of the patched versions: 260, 259.4, 258.6, or 257.12. Debian LTS users should apply the update referenced in the Debian LTS announcement (DLA-4533-1), and Ubuntu users should apply USN-8402-1. As a workaround where patching is not immediately possible, sanitize nspawn storage directories to ensure no .nspawn config files are present, or verify that any existing config files do not use the PivotRoot=, BindUser=, or Ephemeral= options (systemd Advisory, Red Hat Bugzilla).
The vulnerability received coverage from Linux security news outlets including LinuxSecurity.com (covering both Debian and Ubuntu advisories) and LinuxCompatible.org. Red Hat tracked the issue via Bugzilla and assigned medium severity. The Yocto Project security mailing list also flagged the issue for embedded Linux users. No significant researcher commentary or social media debate has been observed, consistent with the moderate severity and high exploitation complexity of the vulnerability.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."