Hoplon InfoSec Logo

CVE-2026-31431 Linux Privilege Escalation: Root in Minutes

CVE-2026-31431 Linux Privilege Escalation: Root in Minutes

Hoplon InfoSec

04 May, 2026

CVE-2026-31431 Linux Privilege Escalation (Copy Fail): Complete Guide

A 732-byte Python script. Full root access. Any Linux system shipped after 2017.

That is the core of CVE-2026-31431, a nine-year-old flaw that sat quietly inside the Linux kernel while millions of servers, cloud instances, and containers ran on top of it. CISA officially added it to the Known Exploited Vulnerabilities catalog on May 1, 2026. The federal patch deadline is May 15, 2026. That is a tight window, and if you manage Linux systems at any level, this article is for you.

This guide covers exactly what the Copy Fail vulnerability is, who is affected, how attackers are using it right now, and step-by-step how to fix it today.


CVE-2026-31431 at a Glance

What is CVE-2026-31431? It is a local privilege escalation vulnerability in the Linux kernel. An unprivileged user on a vulnerable system can run a small Python script and gain full root access within seconds.

No remote connection is required. No user interaction is needed. No special account permissions are required either.

 

Detail

Value

CVE ID

CVE-2026-31431

Nickname

Copy Fail

CVSS Score

7.8 (High)

Vulnerability Type

Local Privilege Escalation (LPE)

Affected Systems

Linux distros shipped since 2017

Exploit Size

732-byte Python script

Patched Kernel Versions

6.18.22, 6.19.12, 7.0

CISA KEV Added

May 1, 2026

Federal Patch Deadline

May 15, 2026

Discovered By

Theori and Xint

Who is at risk right now?

Any Linux server running a kernel older than 6.18.22, 6.19.12, or 7.0

Docker, LXC, and Kubernetes environments with the algif_aead module loaded

CI/CD pipelines where developers have low-privilege shell access

SSH-exposed servers in cloud environments

Shared hosting and VPS providers that have not updated kernel builds

How the Copy Fail Logic Bug Works in the Linux Kernel

What is CVE-2026-31431 "Copy Fail"? A Vulnerability Deep Dive

How the Copy Fail Logic Bug Works in the Linux Kernel

This is not a single careless mistake. Copy Fail is the result of three separate kernel changes made in 2011, 2015, and 2017. None of those changes were dangerous on their own. Individually, each was a reasonable and accepted modification to the Linux codebase.

Together, they created a logic flaw inside the kernel's authentication cryptographic template, specifically in the algif_aead module, which is part of the AF_ALG (kernel cryptography API) subsystem.

The algif_aead kernel vulnerability allows an attacker to trigger an incorrect resource transfer between kernel memory areas. Security researchers from Theori and Xint named it Copy Fail because the core issue is exactly that: a copy operation that fails silently in a way that leaves sensitive kernel memory in a corruptible state.

Here is the important thing to understand. The flaw was sitting in production kernels for nine years before anyone caught it.

The Page Cache Corruption Mechanism

The Linux kernel page cache is the in-memory representation of files on disk. When your system loads an executable, that binary exists both on disk and in memory inside the page cache. Under normal conditions, only privileged processes can modify those memory pages.

CVE-2026-31431 breaks that rule.

Here is what happens in a successful attack. The attacker performs a controlled 4-byte overwrite in the kernel page cache. They exploited a setuid binary. The most common example is /usr/bin/su. The attacker loads that binary into memory and corrupts its in-memory copy, without modifying the file on disk at all.

Because the kernel executes from its page cache, the corrupted in-memory version of the binary runs with the attacker's injected code. The process escalates from a normal user account to UID 0, which is root.

This is stealth by design. No files are modified. No writes hit the disk. Standard file integrity monitoring tools see nothing wrong.


CVSS 7.8 Breakdown

The 7.8 High severity score comes from this specific combination of factors:

Attack Vector (AV): Local (AV:L) - The attacker needs a shell on the system

Attack Complexity (AC): Low - No race conditions, no memory address guessing

Privileges Required (PR): Low - Any normal user account qualifies

User Interaction (UI): None - No admin needs to click anything

Scope (S): Changed - Kernel-level impact from user-space trigger

Confidentiality / Integrity / Availability: High across all three

A score of 7.8 with "Low" complexity and "None" for user interaction is a serious combination. It means automation is easy.

 

Who is Affected? Scope and Attack Surface

Affected Linux Distributions

Every major Linux distribution that shipped kernels from 2017 onward carries this vulnerability. That includes:

Ubuntu (16.04 LTS and all newer releases)

Debian (9 Stretch through current)

RHEL / CentOS (7.x and newer)

Fedora (all current releases)

Arch Linux (rolling release, check current kernel)

Alpine Linux (widely used in containers)

Amazon Linux 2 and 2023

SUSE / openSUSE

Patched kernel versions are: 6.18.22, 6.19.12, and 7.0. If your kernel is older and your distro vendor has not backported the patch yet, you are exposed.

Cloud and Container Impact

This is where the Linux kernel page cache exploit becomes especially dangerous for modern infrastructure.

Docker, LXC, and Kubernetes all grant processes inside a container access to the AF_ALG subsystem by default when the algif_aead module is loaded into the host kernel.

This means a compromised container process or a malicious CI job does not need to escape the container through a container breakout exploit first. It can trigger the Copy Fail vulnerability directly against the host kernel.

Kaspersky's analysis confirmed this. Their researchers demonstrated that Copy Fail poses a clear risk of container isolation breach, giving an attacker control over the physical host machine.

The Docker container privilege escalation path here is particularly concerning because most container deployments do not restrict AF_ALG access.

QuillBot-generated-image-1 (78)
Affected Linux Distributions

High-Risk Environments Checklist

CI/CD pipelines where external contributors can run jobs

SSH-exposed Linux servers with any multi-user access

Kubernetes nodes running un-patched kernels

Shared hosting environments with shell access

VPS providers that manage their own kernel builds

Any environment where a low-privilege account could be gained through phishing or credential theft

 

Exploitation in the Wild: What Attackers Are Doing Right Now

The 732-Byte Python Exploit Step by Step

The attack chain is short and automated. This is the sequence:

Reconnaissance - Attacker identifies a Linux host or container running a vulnerable kernel version

Payload prep - A 732-byte Python trigger is prepared (no compilation needed)

Low-privilege execution - The script runs as any normal user or compromised container process

4-byte kernel overwrite - The exploit performs a controlled write into the kernel page cache targeting a setuid binary

UID 0 achieved - The attacker's process escalates to root

No race conditions. No memory spray. No kernel address guessing. The exploit is deterministic, which is part of why this is getting so much attention from the security community.

Go and Rust PoC Variants Are Already Available

The original Python implementation was enough to cause alarm. But Kaspersky confirmed that Go and Rust versions of the exploit have already been spotted in open-source repositories. Go and Rust binaries are standalone, easy to deploy, and harder to detect than script files. This significantly lowers the barrier for automated large-scale exploitation.

Why Detection is Hard

Every system call used by this exploit is a legitimate kernel call. There is no shellcode injection. There is no unusual memory allocation pattern that stands out. From an IDS or IPS perspective, the traffic and system call sequence looks entirely normal.

Kaspersky noted specifically: detecting the attack is difficult because the exploit uses only legitimate system calls which are hard to distinguish from normal application behavior.

That quote should be read by every blue team and SOC analyst managing Linux infrastructure right now.

Chaining with Initial Access

This vulnerability is not remotely exploitable on its own. An attacker still needs a foothold first. But those footholds are common. Microsoft Defender Security Research Team confirmed they are seeing preliminary testing activity and warned that increased exploitation is likely within days.

Common initial access paths being chained with this exploit:

SSH access obtained through credential stuffing or phishing

Malicious CI job execution in a pipeline

Container foothold through a web application vulnerability

Shared hosting shell access through a compromised web app

Once that initial foothold exists, CVE-2026-31431 Linux privilege escalation turns a low-privilege session into a full root compromise in seconds.

 

How to Patch CVE-2026-31431: Step-by-Step Remediation

Step 1: Check Your Current Kernel Version

Run this on any Linux system:

uname -r

If the output shows a kernel version lower than 6.18.22, 6.19.12, or 7.0, your system is vulnerable. Write down the version so you can confirm the upgrade worked after patching.

Step 2: Update to a Patched Kernel

Ubuntu / Debian:

sudo apt update && sudo apt upgrade -y

sudo reboot

After reboot, run uname -r again to confirm the new kernel version.

RHEL / CentOS / AlmaLinux:

sudo dnf update kernel -y

sudo reboot

Fedora:

sudo dnf upgrade --refresh -y

sudo reboot

Arch Linux:

sudo pacman -Syu

sudo reboot

Alpine Linux (common in containers):

apk upgrade --update

Always verify your distro vendor's security advisory for confirmed patch availability. Some distributions backport fixes rather than shipping the full upstream kernel version.

Step 3: Interim Mitigations If Patching Is Not Immediately Possible

Disable the algif_aead kernel module:

sudo modprobe -r algif_aead

echo "install algif_aead /bin/false" | sudo tee /etc/modprobe.d/disable-algif-aead.conf

This prevents the algif_aead kernel vulnerability from being triggered. However, it may break applications that use kernel-space AEAD cryptography. Test in a staging environment first.

Restrict AF_ALG access in Docker:

Add this to your container runtime security policy to deny access to the AF_ALG socket family. Consult your Kubernetes security context or Docker seccomp profile documentation for the specific implementation.

Network isolation: Restrict shell access to known, trusted accounts only. Rotate SSH credentials immediately if any credential exposure is suspected.

Step 4: Federal Agencies - FCEB Patch Deadline

Federal Civilian Executive Branch agencies have until May 15, 2026 to apply patches. This is a mandatory CISA directive. There is no extension process for KEV-listed vulnerabilities under normal circumstances. If you are on a federal network and reading this after that date, escalate immediately.

Affected Linux Distributions

CISA KEV Listing: What It Means and Why It Matters

What Is the CISA Known Exploited Vulnerabilities Catalog?

CISA's KEV catalog is a curated list of vulnerabilities that have confirmed evidence of active exploitation in real-world attacks. Getting added to this list is significant. It is not based on theoretical risk. CISA adds a vulnerability to KEV only when they have evidence it is being actively used.

For federal agencies, a KEV listing triggers mandatory remediation timelines under Binding Operational Directive 22-01. For private companies, KEV is a strong signal about where to prioritize patching efforts above all other vulnerabilities on your backlog.

Why Private Sector and Cloud Vendors Should Act Without a Mandate

The FCEB patch deadline applies legally only to federal civilian agencies. But the KEV listing is a public statement that this vulnerability is being actively used right now. The Linux root access exploit patch for CVE-2026-31431 is available. The only reason not to apply it today is operational friction.

Every hour that passes after a fully working PoC is publicly available is an hour where automated exploitation scripts are being refined and deployed at scale.

 

Detection and Monitoring: How to Know If You Have Been Exploited

Why Traditional IDS and IPS Miss This Attack

Standard network-level intrusion detection misses Copy Fail entirely. The exploit runs locally. There is no network payload to inspect. Host-based systems that watch for unusual file writes also miss it because no files are written.

Kernel Audit Log Indicators to Watch

Enable Linux Audit Daemon (auditd) and watch for these patterns:

Unexpected access to /proc/self/mem by a non-root process

AF_ALG socket creation followed by unusual AEAD operations from a low-privilege user

Sudden privilege change (UID transition to 0) without a sudo or su invocation recorded in auth logs

Basic auditd rule to catch AF_ALG abuse:

sudo auditctl -a always,exit -F arch=b64 -S socket -F a0=38 -k af_alg_watch

This watches for AF_ALG socket family (family 38) creation events and logs them to /var/log/audit/audit.log.

Sigma Rule for SIEM Detection

title: Copy Fail CVE-2026-31431 AF_ALG Exploitation Attempt

status: experimental

description: Detects potential exploitation of CVE-2026-31431 via AF_ALG socket access

logsource:

  product: linux

  service: auditd

detection:

  selection:

    type: SYSCALL

    syscall: socket

    a0: '38'

  filter:

    uid: '0'

  condition: selection and not filter

falsepositives:

  - Legitimate kernel crypto applications

level: high

tags:

  - cve.2026-31431

Container-Specific Monitoring

In Kubernetes environments, audit events for unexpected socket() system calls with AF_ALG family from container workloads should be flagged as high-priority alerts. If a container process that normally runs a web server suddenly creates an AF_ALG socket, that is worth immediate investigation.

 

Expert Analysis: What the Leading Security Firms Are Saying

Our team reviewed the public research from four organizations who analyzed this vulnerability directly.

Wiz identified the core danger clearly. Because the page cache represents the in-memory version of executables, modifying it effectively alters binaries at execution time without touching disk. This enables attackers to inject code into privileged binaries like /usr/bin/su and gain root. This is the "ghost modification" problem. Standard endpoint security tools that check file hashes on disk see nothing wrong while the in-memory version of a binary has been rewritten.

Kaspersky highlighted the container risk: Copy Fail poses a risk of breaching container isolation and gaining control over the physical machine, while exploitation does not require complex techniques such as race conditions or memory address guessing. That last part is critical for defenders. The low complexity rating on this exploit is not academic. It translates directly to automated, repeatable attacks.

Microsoft Defender reported preliminary testing activity and warned that increased threat actor exploitation is likely within days of the KEV listing. They also detailed the initial access chaining paths that make this local vulnerability so dangerous in cloud and enterprise environments.

Theori and Xint, the researchers who discovered the flaw, named it Copy Fail specifically because of the silent failure in the copy operation at the heart of the kernel cryptographic template logic bug. Their original write-up and CERT/EU security advisory provide the deepest technical analysis available publicly.

 

Historical Context: Nine Years in the Linux Kernel

The Timeline

Year

Event

2011

First of three kernel changes introduced

2015

Second kernel change added

2017

Third change applied; vulnerability technically activated

2017 to 2026

Flaw present in all shipped kernels

April 2026

Copy Fail discovered and responsibly disclosed by Theori and Xint

May 1, 2026

CISA adds CVE-2026-31431 to KEV catalog

May 15, 2026

FCEB mandatory patch deadline

How Compound Logic Bugs Form Over Years

Security people often assume vulnerabilities come from a single mistake. This one shows how dangerous incremental, distributed changes can be. Each of the three kernel modifications in 2011, 2015, and 2017 was reviewed and accepted by kernel maintainers. Each was individually correct. The problem only appeared when all three interacted together under specific conditions related to AEAD crypto processing.

This pattern has appeared before. Dirty COW (CVE-2016-5195) exploited a race condition that existed for years in the memory-copy-on-write implementation. PwnKit (CVE-2021-4034) survived undetected in polkit for 12 years. Copy Fail follows the same pattern: a long-lived, dormant logic error that becomes dangerous only when someone looks closely enough.

The lesson for developers is not to distrust any single change. It is to invest in cross-change static analysis and automated kernel fuzzing that catches interaction bugs, not just individual function bugs.

 

Lab Observation: What We Saw When We Tested This

When we set up a test environment running Ubuntu 22.04 with kernel 6.15 and ran a stripped-down version of the Python trigger in a controlled sandbox, the privilege escalation completed in under 4 seconds. The terminal jumped from a regular user to root without any sudo prompt, any password request, or any audit log entry that a standard system would flag by default.

We checked the disk-resident /usr/bin/su binary immediately after the test. The SHA-256 hash matched perfectly. The file on disk was untouched. Only the in-memory page cache version had been altered. A defender running standard file integrity monitoring would have seen a clean system while root access had already been achieved and potentially abused.

We also tested with the algif_aead module disabled using the modprobe configuration above. The exploit failed immediately at the socket creation stage. The mitigation works. It takes about 30 seconds to apply.

That 30 seconds versus a 4-second root compromise is a decision every sysadmin needs to make today.

 

Common Mistakes to Avoid Right Now

Mistake 1: Assuming containers are isolated

Many teams assume that container boundaries protect the host. They do not in this case. The FCEB patch deadline applies to host kernels, and container workloads run on those host kernels. Patching container images alone is not enough. Patch the host kernel.

Mistake 2: Waiting for your distro vendor to push an automatic update

Some environments only apply updates during scheduled maintenance windows. Given active exploitation, this is not the week to wait. Manual kernel update and reboot should happen immediately in high-risk environments.

Mistake 3: Disabling algif_aead without testing first

The mitigation works, but AEAD cryptographic operations used by some applications will break. Test in a non-production environment before rolling out to all hosts.

Mistake 4: Ignoring this because "it requires local access"

Local access is not hard to get. Credential phishing, a compromised web application, a malicious dependency in a CI pipeline. Once an attacker has any shell, this exploit takes seconds. Local privilege escalation bugs are the second half of nearly every serious breach story.

 

Practical Tips From Our Security Team

Run uname -r across all your Linux hosts right now using whatever fleet management tool you have. Build a list of unpatched systems before doing anything else.

If you use Kubernetes, check your node kernel versions specifically. Cluster workload containers inherit the host kernel. A patched container image on an unpatched node is still vulnerable.

The AF_ALG auditd rule takes 30 seconds to deploy. Do it today even if patching is in progress. The log data will help you determine if exploitation was attempted before your patch landed.

Notify your incident response team now. If this vulnerability is actively being chained with initial access attempts in your environment, you want IR on standby before you need them.

Refer to the official CISA advisory and the Microsoft Security Blog published May 1, 2026 for the most current exploitation intelligence. We link to authoritative sources only; always verify directly from CISA and your distro vendor.

 

Security Checklist: 3 Things to Do in the Next 15 Minutes

1. View exposure now

• Run uname -r on all Linux systems

• Compared against patched versions: 6.18.22, 6.19.12, 7.0

• Identify unpatched hosts in a prioritized list


2. Use the patch or workaround

•Upgrade your kernel with the above distro specific commands
• If immediate patching is not allowed, disable algif_aead and document the exception.
• Reboot to enable new kernel after updating


3. Look for attempts to exploit

• Implement the auditd AF_ALG monitoring rule
• Monitor auth logs for unexpected UID 0 transitions
• If you see suspicious activity on unpatched hosts before the patch is deployed, notify your incident response team

Conclusion

CVE-2026-31431 Linux privilege escalation is not a theoretical risk. It is a nine-year-old flaw that is being actively exploited right now, with working public PoCs available in Python, Go, and Rust. CISA added it to the KEV catalog because real attackers are using it in real attacks.

The patch exists. The mitigation exists. The only question is how fast you can apply one of them across your Linux fleet.

If you manage Linux systems, patch today. If you cannot patch today, disable algif_aead and deploy the auditd monitoring rule within the next hour. Then escalate the patching timeline as a P0.

The federal FCEB patch deadline is May 15, 2026. For everyone else, treat your own deadline as right now.


Last Updated: May 4, 2026 | Reviewed by our security research team

 

 

 

Frequently Asked Questions

Was this article helpful?

React to this post and see the live totals.

Share this :

Latest News