Copy Fail: Linux kernel crypto RCE (CVE-2026-31431) [PoC]
CVE-2026-31431
Copy Fail (CVE-2026-31431): Linux kernel crypto AEAD bug grants local code execution. CVSS 7.8, CISA KEV-listed, actively exploited. Patch your kernel now.
Actively exploited in the wild — Copy Fail (CVE-2026-31431) is a high-severity vulnerability in the Linux kernel’s crypto subsystem (algif_aead) that grants local attackers arbitrary code execution at kernel level. Disclosed by Theori / Xint as “Copy Fail,” the bug is confirmed exploited in the wild, has multiple public PoCs, and is weaponized in a Metasploit module.
Overview
Copy Fail (CVE-2026-31431) affects the Linux kernel’s crypto/algif_aead module, specifically the implementation of AEAD (Authenticated Encryption with Associated Data) operations via the AF_ALG socket interface. A commit reverted the in-place operation logic, reintroducing a flaw where the source and destination buffers use different memory mappings without proper separation.
The vulnerability arises from the removal of complexity added to support in-place encryption in algif_aead. By operating out-of-place again, the kernel fails to properly isolate the source and destination buffers, allowing a local attacker to trigger memory corruption that can lead to privilege escalation or system crash. Researchers note Copy Fail is unusual among Linux LPEs in that it requires no race window and no kernel-specific offset — a single straight-line logic flaw that exploits cleanly across distributions.
Impact
This vulnerability carries a CVSS 7.8 (HIGH) rating with a LOCAL attack vector (AV:L) requiring LOW privileges and NO user interaction. The primary impact is to confidentiality, integrity, and availability - an attacker with low-privilege access to a system can exploit this to execute arbitrary code at kernel level.
The CISA Known Exploited Vulnerabilities (KEV) catalog confirms active exploitation in the wild. The EPSS score of 2.6% indicates a moderate probability of broader exploitation within the next 30 days.
Affected Systems
All Linux kernel versions that include the affected algif_aead commit are vulnerable. This broadly impacts enterprise servers, cloud instances, and embedded devices running unpatched Linux kernels.
Remediation
- Apply the kernel patch immediately: The fix is included in current stable kernel releases. Update to the latest kernel for your distribution.
- For enterprise distros:
- Red Hat/CentOS: Update to kernel-4.18.0-553 or later (RHEL 8)
- Ubuntu: Apply kernel updates from ubuntu-security-announce
- SUSE: Update to kernel-default-5.14.21-150400.24.135 or later
- Mitigation without patching: Restrict access to the AF_ALG socket family by using SELinux or AppArmor policies. This limits exploitation surface but is not a complete fix.
Security Insight
This vulnerability echoes a pattern seen in other recent Linux kernel bugs where in-place vs. out-of-place memory handling causes security boundaries to collapse. The revert to out-of-place operation was intended to simplify the code, but introduced a regression that attackers are actively exploiting. This incident underscores the importance of rigorous regression testing in cryptographic subsystems, where even memory-safe design patterns can reintroduce vulnerabilities when boundaries between kernel and userspace mappings are not carefully managed.
Related reading: Nine CrackArmor Flaws in Linux AppArmor Enable Root and China-Linked Hackers Use TernDoor, PeerTime, BruteEntry.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Metasploit Modules
Weaponized exploit code — authorized use only
The Metasploit Framework modules below are production-ready exploit code maintained by Rapid7. Unlike random GitHub PoCs, these are vetted by Metasploit maintainers and integrated into a point-and-click exploitation framework used by red teams worldwide. The presence of an MSF module means this CVE is trivially exploitable at scale — patch immediately.
Authorized use only. Run only against systems you own or have explicit written permission to test. Using exploit code against systems you do not own is illegal in most jurisdictions and violates Yazoul's terms of use.
| Module | Source |
|---|---|
exploit/linux/local/cve_2026_31431_copy_fail | View source |
1 Metasploit module indexed for this CVE. Source: rapid7/metasploit-framework.
Public PoC References
Unverified third-party code
These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).
Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.
| Repository | Stars |
|---|---|
| theori-io/copy-fail-CVE-2026-31431 Copy Fail (CVE-2026-31431): 9-year-old Linux kernel LPE found by Theori's Xint Code | ★ 3831 |
| tgies/copy-fail-c Cross-platform C port of the Copy Fail Linux LPE (CVE-2026-31431). Disclosed 2026-04-29 by Theori / Xint. | ★ 401 |
| badsectorlabs/copyfail-go A Go implementation of copyfail (CVE-2026-31431) | ★ 349 |
| Percivalll/Copy-Fail-CVE-2026-31431-Kubernetes-PoC PoC: fully unprivileged container escape to node-level code execution on Kubernetes via CVE-2026-31431 page-cache corruption + shared image layers. Validated on Alibaba Cloud ACK, Amazon EKS and Googl | ★ 136 |
| Sndav/CVE-2026-31431-Advanced-Exploit CVE-2026-31431 纯文件利用 | ★ 98 |
Showing 5 of 235 known references. Source: nomi-sec/PoC-in-GitHub.
Related Advisories
Semantic Kernel, Microsoft's semantic kernel Python SDK, has a remote code execution vulnerability in versions prior to 1.39.4, specifically within the `InMemoryVectorStore` filter functionality. The ...
Out of bounds read and write in V8 in Google Chrome prior to 149.0.7827.103 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page. (Chromium security severity: H...
Integer overflow in Blink in Google Chrome prior to 148.0.7778.96 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page. (Chromium security severity: Critical)...
Use after free in Chromoting in Google Chrome on Linux prior to 148.0.7778.96 allowed a remote attacker to execute arbitrary code via malicious network traffic. (Chromium security severity: Critical)...
Related Across Yazoul
Other Linux Kernel Vulnerabilities
Out of bounds read and write in V8 in Google Chrome prior to 149.0.7827.103 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page. (Chromium security severity: H...
Integer overflow in Blink in Google Chrome prior to 148.0.7778.96 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page. (Chromium security severity: Critical)...
Use after free in Chromoting in Google Chrome on Linux prior to 148.0.7778.96 allowed a remote attacker to execute arbitrary code via malicious network traffic. (Chromium security severity: Critical)...
Out of bounds read and write in V8 in Google Chrome prior to 148.0.7778.96 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page. (Chromium security severity: Hi...