Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2026-31431 — Linux kernel local privilege escalation exploit for CVE-2026-31431, providing a reliable single-shot PoC with multiple language implementations, vulnerability scanner, and mitigation script. | Kitploit
Tools/GitHubGitHub/nisec-eric/cve-2026-31431
Privilege EscalationContainer SecurityExploit FrameworksVulnerability AnalysisExploitationPenetration TestingCloud SecurityLearning & EducationRed TeamingBinary Exploitation
GitHubnisec-eric/cve-2026-31431

cve-2026-31431

2134 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Linux kernel local privilege escalation exploit for CVE-2026-31431, providing a reliable single-shot PoC with multiple language implementations, vulnerability scanner, and mitigation script.

View Repository

CVE-2026-31431 — "Copy Fail" Research Repository

Severity: High CVSS: 7.8 CVE Release License: MIT

A 100% reliable Linux local privilege escalation affecting every mainstream distribution since 2017.

One logic bug in authencesn, chained through AF_ALG and splice() into a 4-byte page-cache write — silently exploitable for nearly a decade.

⚠️ Disclaimer

All code and documentation in this repository is provided exclusively for authorized security research and educational purposes.

Running exploit code against systems you do not own or have explicit written authorization to test is illegal. By using this repository, you accept full responsibility for your actions.


Overview

Why Copy Fail is different


Repository Structure

root@kitploit:~
.
├── README.md                          ← You are here
├── LICENSE                            ← MIT
├── .gitignore
├── docs/
│   ├── analysis-report.md             ← Comprehensive security analysis
│   ├── analysis-report.html           ← Styled HTML version
│   ├── exploit-walkthrough.md         ← Line-by-line PoC analysis
│   └── exploit-walkthrough.html       ← Styled HTML version
└── poc/
    ├── README.md                      ← PoC usage guide
    ├── copy_fail_exp.py               ← Official PoC (732 bytes, obfuscated)
    ├── copy_fail_exp_readable.py      ← Deobfuscated + annotated version
    ├── copy_fail_exp_compat.py        ← Python 3.6+ compat (ctypes splice)
    ├── copy_fail_exp_alpine.py        ← Alpine Linux variant
    ├── copy_fail_exp.c                ← C implementation (zero deps)
    ├── copy_fail_exp.go               ← Go implementation (zero deps)
    ├── copy_fail_rust/                ← Rust implementation
    │   ├── Cargo.toml
    │   └── src/main.rs
    ├── check_vulnerable.py            ← Vulnerability scanner
    └── mitigate.sh                    ← One-click mitigation script

Quick Start

Download pre-built release

root@kitploit:~
# From GitHub Releases — pre-built binaries (Linux amd64/arm64) + all Python scripts
wget https://github.com/nisec-eric/cve-2026-31431/releases/latest/download/copy-fail-go-linux.tar.gz
wget https://github.com/nisec-eric/cve-2026-31431/releases/latest/download/copy-fail-c-linux.tar.gz
wget https://github.com/nisec-eric/cve-2026-31431/releases/latest/download/copy-fail-python.tar.gz

tar xzf copy-fail-go-linux.tar.gz
tar xzf copy-fail-c-linux.tar.gz
tar xzf copy-fail-python.tar.gz

# Go static binary (no Python needed)
chmod +x copy-fail-exp-amd64
./copy-fail-exp-amd64

# C static binary
chmod +x copy-fail-exp-c-amd64
./copy-fail-exp-c-amd64

# Or use Python scripts directly
python3 check_vulnerable.py

📦 Releases are auto-built via GitHub Actions on every v* tag push. Go and C binaries are built for linux/amd64 and linux/arm64 as static binaries.

1. Check if your system is vulnerable

root@kitploit:~
python3 poc/check_vulnerable.py

2. Apply mitigation (no reboot required)

root@kitploit:~
sudo bash poc/mitigate.sh

This blacklists the algif_aead kernel module — breaks nothing for 99% of systems.

3. Patch properly — upgrade your kernel

root@kitploit:~
# Debian/Ubuntu
sudo apt update && sudo apt upgrade linux-image-*

# RHEL/CentOS/Fedora
sudo dnf update kernel

# Reboot into patched kernel
sudo reboot

4. Verify

root@kitploit:~
python3 poc/check_vulnerable.py
# Exit code 1 = protected ✓

PoC Exploits

WARNING: Run only on systems you own or have authorization to test.

root@kitploit:~
# C
gcc -static -o exp ./poc/copy_fail_exp.c && ./exp

# Python
python3 poc/copy_fail_exp.py
python3 poc/copy_fail_exp_compat.py        # Python < 3.10

# Go
go build -o exp ./poc/copy_fail_exp.go && ./exp

# Rust
cd poc/copy_fail_rust && cargo run --release

All versions accept an optional argument to target a different SUID binary:

root@kitploit:~
python3 poc/copy_fail_exp.py /usr/bin/passwd
./exp /usr/bin/sudo

Documentation

📄 Security Analysis Report (HTML)

Full vulnerability assessment covering:

  • Technical root cause (scatterlist page provenance, authencesn scratch write)
  • Affected versions and distribution patch status
  • Remediation for bare-metal Linux, Kubernetes, Docker, WSL2
  • Detection and monitoring guidance (auditd, SELinux, file integrity)
  • Disclosure timeline

📄 Exploit Walkthrough (HTML)

Line-by-line PoC analysis covering:

  • Complete deobfuscated source with annotations
  • Kernel internals: AF_ALG socket flow, splice() page-cache delivery, sg_chain() mechanics
  • The authencesn ESN scratch write that crosses scatterlist boundaries
  • Payload analysis (160-byte ELF shellcode)
  • Attack variants: /etc/passwd injection, shared library targeting, container escape
  • Attack limitations and boundaries

Impact by Environment


Key References

  • copy.fail — Official vulnerability page
  • Xint Blog — Technical Writeup — Root cause deep-dive
  • NVD Entry
  • GitHub Advisory GHSA-2274-3hgr-wxv6
  • Kernel Patch (commit a664bf3d603d)
  • Official PoC Repository
  • Red Hat Advisory | Ubuntu | SUSE | Amazon Linux

Contributing

Contributions welcome:

  • Additional PoC implementations (Zig, etc.)
  • Distribution-specific test results
  • Detection rules (Snort, Suricata, YARA, Sigma)
  • Translations of documentation

Please open an issue or pull request.

License

MIT — Use responsibly.

Download Tool
FieldDetail
CVECVE-2026-31431
AliasCopy Fail
TypeLinux kernel local privilege escalation (LPE) / page-cache arbitrary write
CVSS v3.17.8 HIGH — AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWECWE-669 (Incorrect Resource Transfer Between Spheres)
Componentcrypto/algif_aead — authencesn cryptographic template
Introduced2017 (commit 72548b093ee3)
FixedMainline commit a664bf3d603d (2026-04-01)
Patched kernelv6.18.22+, v6.19.12+, v7.0+
DiscovererXint / Theori (Taeyang Lee + Xint Code AI-assisted audit)
Disclosure2026-04-29 — copy.fail
Typical Linux LPECopy Fail
Race conditionRequiredNone
Per-distro offsetsRequiredNone
Reliability30–80%100%, single shot
Affected windowNarrow2017 → 2026 (9 years)
On-disk modificationPossibleNone (stealthy)
Cross-containerNoYes
FileLanguageRequirementsNotes
copy_fail_exp.pyPython 3.10+stdlib onlyOfficial 732-byte PoC
copy_fail_exp_compat.pyPython 3.6+stdlib + ctypesWorks on CentOS 7, AL2 etc.
copy_fail_exp_alpine.pyPython 3.10+stdlib onlyTargets /bin/ping on Alpine
copy_fail_exp.cCgcc + Linux headersStatic binary, zero deps
copy_fail_exp.goGo 1.21+stdlib onlyStatic binary, zero deps
copy_fail_rust/Rust 1.70+libc + flate2 cratesStatic binary
EnvironmentRiskWhy
Multi-tenant Linux hosts🔴 HighAny user → root
Kubernetes / containers🔴 HighShared page cache → container escape
CI runners (self-hosted)🔴 HighMalicious PR → runner root
Cloud SaaS (user code)🔴 HighTenant → host root
Standard servers🟡 MediumChains with web RCE / stolen creds
Single-user laptops🟢 LowAlready the only user