CVE-2026-31431, dubbed Copy Fail, is a local privilege escalation vulnerability in the Linux kernel, discovered by researchers at Xint Code and Theori. A mere 732-byte Python script is sufficient to gain root access on nearly all major distributions released since 2017, including Ubuntu, Red Hat, SUSE, and Amazon Linux.
This small Python script, weighing in at less than a kilobyte, is all an attacker needs to elevate their privileges to the highest level on a Linux system. Identified as CVE-2026-31431 and nicknamed Copy Fail, this vulnerability affects the algif_aead module of the kernel’s cryptographic subsystem. It impacts all Linux kernels compiled since 2017, meaning close to a decade’s worth of active Linux infrastructure across enterprises, government agencies, and cloud environments.
What sets this flaw apart is its exceptional portability. Major Linux kernel privilege escalation vulnerabilities often come with specific conditions. For example, Dirty Cow required a random race condition, while Dirty Pipe was restricted to certain kernel versions. In contrast, Copy Fail executes deterministically, utilizing the same uncompiled Python script across Ubuntu, Amazon Linux, Red Hat, and SUSE. This consistent reliability places it in a unique category among vulnerabilities of its kind.
A Flaw in the Kernel’s Cryptographic Interface
The origins of CVE-2026-31431 trace back to a change made in 2017 to the code of the algif_aead module. This module is part of AF_ALG, the interface that exposes the Linux kernel’s cryptographic primitives to user space without requiring elevated privileges. An optimization introduced at that time allowed the module to perform in-place encryption by reusing the same buffer for input and output. However, this design harbors a logical flaw in its management of scatter lists.
When a file is transferred to an AF_ALG socket using the splice() primitive, the pages in the kernel’s page cache end up in a modifiable destination list. A non-privileged user can then write controlled four-byte chunks into the page cache of any readable file on the system, including setuid binaries like /usr/bin/su. This modification exists only in memory—within the page cache shared among all system processes—and leaves no trace on disk, rendering it undetectable by file integrity monitoring tools that rely on hash verification.
The CVSS 3.1 score assigned to this vulnerability stands at 7.8, indicating a high severity level. The attack vector is local, exploitation complexity is low, no user interaction is needed, and its impact is rated at the maximum for confidentiality, integrity, and availability.
From 732 Bytes to Root Access
The exploit script released by Xint Code is a mere 732 bytes long. Written in pure Python, it relies solely on standard library modules (os, socket, zlib) and requires Python 3.10 to access the os.splice() primitive. There are no compiled binaries, no external dependencies, and no network vectors involved. The exploit chain utilizes AF_ALG for the cryptographic interface, splice() for page reference transfer, and corrupting the setuid binary in memory to trigger privilege escalation to UID 0.
The Xint Code tool developed by Theori identified this flaw in about an hour of scanning the kernel’s cryptographic subsystem with a single operator command. Theori is known for its nine victories at DEF CON’s Capture the Flag competitions and a third-place finish in DARPA’s AI Cyber Challenge finals. This backdrop highlights a measurable trend: automated code analysis tools are now achieving efficiency comparable to that of specialized offensive research teams within well-defined boundaries.
“A non-privileged local user can write four controlled bytes into the page cache of any readable file on a Linux system and use that to gain root rights,” stated the teams from Xint and Theori. Derivative scripts from the initial proof of concept have quickly begun circulating outside the sphere of coordinated disclosure. Microsoft Defender has reported preliminary testing activities that are likely to evolve into active exploitation in the days following the disclosure.
Kubernetes and Cloud Environments at Risk
The Linux kernel’s page cache is shared among all processes in the system, including those running in containers. This characteristic renders Copy Fail a potent escape primitive for containers. In a Kubernetes environment, a compromised pod can exploit this vulnerability to escalate privileges to the host node and, from there, access the entire cluster. Microsoft Defender estimates that millions of Kubernetes clusters and a significant fraction of Linux workloads in cloud environments are exposed.
The risk is exacerbated for continuous integration and deployment pipelines due to the nature of the workloads executed. These environments frequently run code from third-party repositories or external contributions on shared Linux nodes. In such configurations, the exposure surface for the local vector that is CVE-2026-31431 is structurally more extensive than in single-tenant environments. The CISA has included this vulnerability in its Known Exploited Vulnerabilities (KEV) catalog, requiring immediate remediation from U.S. federal agencies.
The CERT-EU has issued a notice recommending prioritization of Kubernetes nodes and automation executors. A warning is warranted regarding the mitigation measure of disabling the algif_aead module via modprobe. In Red Hat family distributions, including Red Hat Enterprise Linux, AlmaLinux, and CloudLinux, this module is compiled directly into the kernel and cannot be disabled by this method. The command executes without error, yet leaves the system exposed.
Uneven Availability of Fixes
At the time of the upstream patch release in the mainline kernel source, major distributions exhibited varying levels of readiness. Ubuntu made patches available for its active releases and a mitigation measure in the kmod package. Ubuntu 26.04 (Resolute) and later kernels are not affected. Red Hat Enterprise Linux, AlmaLinux, CloudLinux, and SUSE had initiated their release cycles without completing them.
For systems unable to apply a kernel update immediately, Microsoft recommends blocking the creation of AF_ALG sockets through syscall filtering mechanisms (seccomp). This approach is deemed more reliable than the modprobe method on distributions where the module is integrated into the kernel. Detection teams should monitor three families of signals. The delayed loading of the AF_ALG protocol several hundred seconds after system startup is a first indicator. Incomplete auth.log entries during a su command, with a missing username calling it, serve as a second. Memory write behaviors on setuid binaries that lack a corresponding disk trace represent a third.
Copy Fail serves as a stark reminder for information security professionals. The most formidable flaws in the Linux kernel tend to be simple logic bugs that have existed in the code for years and are discovered not through active exploitation, but through systematic analysis. The growing availability of automated analysis tools capable of working across complex subsystems is reducing the window between disclosure, exploit publication, and the first signs of active exploitation.



