Copy Fail: 732 Bytes to Root on Every Linux Distribution Since 2017
CVE-2026-31431 is a local privilege escalation in the Linux kernel cryptographic subsystem. A 732-byte Python script can edit a setuid binary in memory and obtain root. CISA added it to KEV on May 1.
DevSecCode Team · · Vulnerability Analysis · 8 min read
The Vulnerability
CVE-2026-31431, nicknamed "Copy Fail," is a local privilege escalation (LPE) vulnerability in the Linux kernel cryptographic subsystem. The flaw allows a local user to modify the kernel cached copy of a file in memory without changing the file on disk. By targeting a setuid binary, an attacker can gain root access on essentially any Linux distribution shipped since 2017.
The vulnerability was added to CISA Known Exploited Vulnerabilities (KEV) catalog on May 1, 2026. Microsoft security team published a detailed analysis confirming the flaw enables root privilege escalation across cloud environments and Kubernetes workloads.
A public exploit (a single 732-byte Python script) works reliably across all major distributions.
Why This Is Critical for Cloud and Container Environments
The threat model here extends well beyond traditional servers. In Kubernetes environments, a compromised container with this exploit can escalate to node-level root, potentially breaking out of the container sandbox entirely. Cloud providers running shared-tenancy infrastructure are exposed to cross-tenant escalation.
The vulnerability carries a CVSS score of 7.8 (High). While it requires local access, the bar for "local access" in modern infrastructure is low. Any code execution vulnerability in a web application, CI runner, or container workload is now a root escalation chain.
The Technical Mechanism
The flaw is a deterministic logic bug, not a race. It sits in the kernel crypto API: the authencesn template, reached through AF_ALG sockets and splice(), combined with an in-place optimization added to algif_aead in 2017. An unprivileged process can use it to modify the kernel's cached version of a file.
For setuid binaries like /usr/bin/sudo, this means an attacker can patch the binary in the kernel page cache to skip authentication checks, execute it for root, and the on-disk binary remains untouched. Making forensic detection harder.
The CWE Mapping
CWE-669 (Incorrect Resource Transfer Between Spheres): The weakness CISA's KEV entry lists for this CVE.
CWE-269 (Improper Privilege Management): The escalation from unprivileged user to root via setuid binary manipulation.
Patch Status
All major distributions have released kernel patches:
- Ubuntu: Fixes available for 22.04 LTS, 24.04 LTS, 24.10, 26.04
- RHEL/CentOS: RHSB-2026-002 advisory with updated kernels
- Debian: Fixed in stable and testing branches
- Alpine: Fixed in 3.19+
How Deva Addresses This
This is a host issue: a container image does not carry the running kernel. Deva does not check kernel versions, so track this one through your distribution's advisories and patch hosts directly.
Related glossary terms
More articles
Exchange Server XSS-to-Spoofing: CVE-2026-42897 Added to CISA KEV
A cross-site scripting flaw in on-premises Microsoft Exchange Server enables email spoofing via crafted messages. CISA added it to KEV on May 15 with a May 29 federal deadline.
NGINX Rift: An 18-Year-Old Heap Buffer Overflow Just Got a CVE and a PoC
CVE-2026-42945 is a critical heap buffer overflow in NGINX rewrite module that has existed since 2008. CVSS 9.2, public PoC, zero authentication required.