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-copy-fail — Automated scanner and patch helper for CVE-2026-31431, detecting vulnerable Linux hosts via SSH, verifying kernel versions, and applying kernel upgrades or temporary mitigations across multiple distributions. | Kitploit
Tools/GitHubGitHub/gagaltotal/cve-2026-31431-copy-fail
Vulnerability ScannersConfiguration AuditingNetwork Security
GitHubgagaltotal/cve-2026-31431-copy-fail

cve-2026-31431-copy-fail

Automated scanner and patch helper for CVE-2026-31431, detecting vulnerable Linux hosts via SSH, verifying kernel versions, and applying kernel upgrades or temporary mitigations across multiple distributions.

View Repository
23 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

CVE-2026-31431 "Copy Fail" Scanner & Patch Helper

CVE-2026-31431 CVSS Python License

Copy Fail is an automated security scanner and patch helper for detecting and remediating the CVE-2026-31431 vulnerability (Linux Kernel algif_aead Local Privilege Escalation) across your Linux infrastructure.


Table of Contents

  • Description
  • Key Features
  • Requirements
  • Installation
  • Usage
  • Command Options
  • Usage Examples
  • Output & Results
  • Supported Distributions
  • Manual Patch Guide
  • Temporary Mitigation
  • Troubleshooting
  • Security References

Description

CVE-2026-31431 is a Local Privilege Escalation (LPE) vulnerability in the Linux kernel module algif_aead (Asynchronous Cipher Interface for AEAD). This vulnerability allows local users to escalate privileges to root level.

This tool helps you:

  • Automatically scan Linux subnets to detect vulnerable hosts
  • Verify patch status for each host based on kernel version
  • Automatically patch by upgrading the kernel via the package manager
  • Apply temporary mitigation by disabling the algif_aead module
  • Generate structured reports in table and JSON formats

Note: This tool is intended solely for internal audit and patching purposes by sysadmins. Use it only on systems you own or are authorized to access.


Example Screenshot

Screen Capture

Key Features

1. Scalable Scanning

  • Scan a single host, multiple hosts, or an entire subnet
  • Parallel SSH connections with a thread pool (default: 30 threads)
  • Real-time progress bar with Rich UI
  • Automatic retries with exponential backoff for unstable connections

2. Vulnerability Detection

  • Check SSH reachability and authentication
  • Read the kernel version of each host
  • Verify whether the kernel is already patched (based on per-distro database)
  • Detect the status of the algif_aead module (loaded/not loaded)
  • Check whether modprobe.d mitigation has been applied

3. Automatic Patching

Automatically upgrade the kernel on vulnerable hosts via the package manager:

  • apt (Debian/Ubuntu)
  • dnf (Fedora/RHEL 8+)
  • yum (RHEL 7, CentOS 7)
  • zypper (SUSE/openSUSE)
  • pacman (Arch Linux)

Option: Automatic reboot after patching is complete

4. Temporary Mitigation

  • Disable the algif_aead module via modprobe.d configuration
  • Suitable as a temporary fix while waiting for a maintenance window to reboot
  • Note: Not effective on RHEL-family systems if the module is built into the kernel

5. Flexible SSH Authentication

  • SSH key-based authentication (recommended)
  • Password-based authentication
  • Custom SSH port support
  • Connection pooling for resource optimization

6. Comprehensive Security Database

Database of patched kernel versions for:

  • Ubuntu (6.8.0-60, 5.15.0-130, 5.4.0-216)
  • RHEL / CentOS / AlmaLinux / Rocky (5.14.0-570)
  • Fedora (6.14.4, 6.13.12, 6.12.25)
  • Debian (6.1.137, 5.10.235)
  • Arch Linux (6.14.4)
  • Amazon Linux (6.1.134, 5.10.235, 4.14.353)
  • SUSE / openSUSE (6.4.0-18, 5.14.21-150600.24)

7. Comprehensive Reporting

  • Color-coded scan results table (Rich format)
  • Summary statistics (total hosts, vulnerable, patched, etc.)
  • Export results to JSON for integration with other systems
  • Error tracking and retry count per host

Requirements

System Requirements

  • Python: 3.7 or newer
  • OS: Linux/Mac/Windows (with WSL)
  • Network: SSH access to target hosts
  • SSH Key or Password: For authentication

Python Dependencies

root@kitploit:~
paramiko>=3.0.0    # SSH library
rich>=13.0.0       # Beautiful terminal UI

Installation

1. Clone Repository

root@kitploit:~
git clone https://github.com/gagaltotal/cve-2026-31431-copy-fail.git
cd cve-2026-31431-copy-fail

2. Create Virtual VENV

root@kitploit:~
python3 -m venv .venv
source .venv/bin/activate

3. Install Dependencies

root@kitploit:~
pip install -r requirements.txt

or install manually:

root@kitploit:~
pip install paramiko>=3.0.0 rich>=13.0.0

4. Verify Installation

root@kitploit:~
python3 copyfail_scanner.py --help

Usage

Basic Syntax

root@kitploit:~
# Scan subnet with SSH key
python3 copyfail_scanner.py --subnet <CIDR> --user <USERNAME> --key <PATH_TO_KEY>

# Scan multiple specific hosts
python3 copyfail_scanner.py --hosts <IP1>,<IP2>,<IP3> --user <USERNAME> [--password <PASSWORD>]

# Scan + automatic patch
python3 copyfail_scanner.py --subnet <CIDR> --user <USERNAME> --key <PATH> --patch

# Scan + temporary mitigation
python3 copyfail_scanner.py --subnet <CIDR> --user <USERNAME> --key <PATH> --mitigate

Command Options

OptionDescriptionExample
--subnetTarget subnet CIDR (mutually exclusive with --hosts)--subnet 192.168.1.0/24
--hostsComma-separated IP list (mutually exclusive with --subnet)--hosts 192.168.1.10,192.168.1.20
--userSSH username (required)--user root
--passwordSSH password (optional, use if no key)--password secret123
--keySSH private key path--key ~/.ssh/id_rsa
--portSSH port (default: 22)--port 2222
--threadsNumber of parallel threads (default: 30)--threads 50
--patchAutomatically upgrade kernel on vulnerable hosts--patch
--rebootAutomatic reboot after patching (use with --patch)--patch --reboot
--mitigateApply temporary mitigation (disable algif_aead)--mitigate
--outputExport scan results to a JSON file--output results.json
--yesSkip confirmation prompt before patch/mitigate--yes

Usage Examples

Example 1: Basic Subnet Scan (Read-Only)

root@kitploit:~
python3 copyfail_scanner.py \
  --subnet 192.168.1.0/24 \
  --user ubuntu \
  --key ~/.ssh/id_rsa

Output: Displays the scan results table and summary


Example 2: Scan Specific Hosts with Password

root@kitploit:~
python3 copyfail_scanner.py \
  --hosts 10.0.1.5,10.0.1.6,10.0.1.7 \
  --user admin \
  --password my_password123

Example 3: Scan + Temporary Mitigation

root@kitploit:~
python3 copyfail_scanner.py \
  --subnet 172.16.0.0/16 \
  --user root \
  --key ~/.ssh/id_rsa \
  --mitigate

Action: Scan all hosts, then disable the algif_aead module on vulnerable hosts (prompts for confirmation)


Example 4: Scan + Automatic Patch (Without Reboot)

root@kitploit:~
python3 copyfail_scanner.py \
  --subnet 192.168.0.0/24 \
  --user ubuntu \
  --key ~/.ssh/id_rsa \
  --patch

Action: Upgrade the kernel, but do not reboot automatically (requires manual reboot)


Example 5: Scan + Patch + Automatic Reboot

root@kitploit:~
python3 copyfail_scanner.py \
  --subnet 10.10.0.0/24 \
  --user root \
  --key ~/.ssh/id_rsa \
  --patch \
  --reboot \
  --yes

Action: Scan, patch the kernel, reboot automatically, skip confirmation


Example 6: Scan + Export JSON Results

root@kitploit:~
python3 copyfail_scanner.py \
  --subnet 192.168.1.0/24 \
  --user sysadmin \
  --key ~/.ssh/id_rsa \
  --output scan_results_$(date +%Y%m%d_%H%M%S).json

Output: Table in the terminal + JSON results in a file


Example 7: Scan with Multiple Threads & Custom Port

root@kitploit:~
python3 copyfail_scanner.py \
  --subnet 10.0.0.0/25 \
  --user ubuntu \
  --key ~/.ssh/id_rsa \
  --port 2222 \
  --threads 50

Output & Results

Terminal Output (Table)

Example output from a scan:

root@kitploit:~
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━┓
┃ IP            ┃ Hostname       ┃ Distro        ┃ Kernel        ┃ algif   ┃ Status  ┃ Action  ┃ Notes   ┃
┣━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━╋━━━━━━━━━╋━━━━━━━━━╋━━━━━━━━━┫
┃ 192.168.1.10  ┃ web-01         ┃ Ubuntu 22.04  ┃ 6.8.0-60      ┃ LOADED  ┃ ✓ SAFE  ┃ -       ┃ Patched ┃
┃ 192.168.1.11  ┃ web-02         ┃ Ubuntu 20.04  ┃ 5.4.0-200     ┃ NOT_LDD ┃ ✗ VULN  ┃ Patched ┃ -       ┃
┃ 192.168.1.12  ┃ db-01          ┃ RHEL 8.9      ┃ 5.14.0-560    ┃ LOADED  ┃ ? UNKNO ┃ -       ┃ Distro  ┃
┗━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┛

Summary:
  Total hosts scanned: 12
  Accessible (SSH): 11
  Offline: 1
  VULNERABLE: 2
  Already patched: 8
  Unknown status: 1

Output Columns

  • IP: Target IP address
  • Hostname: Hostname from hostname -f
  • Distro: Linux distribution (from /etc/os-release)
  • Kernel: Kernel version (from uname -r)
  • algif_aead: Module status (LOADED/not loaded/blocked)
  • Status: ✓ SAFE / ✗ VULNERABLE / ? UNKNOWN
  • Patch/Mitigation: Action applied (Kernel upgrade/Mitigation)
  • Notes: Error or additional information

JSON Export Format

root@kitploit:~
{
  "cve": "CVE-2026-31431",
  "scan_time": "2026-05-08T15:30:45.123456",
  "results": [
    {
      "ip": "192.168.1.10",
      "ssh_reachable": true,
      "auth_ok": true,
      "hostname": "web-01",
      "distro": "Ubuntu 22.04 LTS",
      "os_id": "ubuntu",
      "kernel_version": "6.8.0-60-generic",
      "algif_loaded": true,
      "modprobe_blocked": false,
      "patched": true,
      "patch_applied": false,
      "mitigation_applied": false,
      "retry_count": 0,
      "error": ""
    }
  ]
}

Supported Distributions

The scanner supports automatic detection for the following distributions:

DistroPackage ManagerPatched Kernel VersionsNotes
Ubuntuapt6.8.0-60, 5.15.0-130, 5.4.0-216LTS & current
Debianapt6.1.137, 5.10.235Stable releases
RHELdnf/yum5.14.0-570Includes CentOS Stream
AlmaLinuxdnf5.14.0-570Drop-in RHEL replacement
Rockydnf5.14.0-570Enterprise-focused
Fedoradnf6.14.4, 6.13.12, 6.12.25Cutting-edge
Amazon Linuxdnf6.1.134, 5.10.235, 4.14.353AWS compatibility
SUSE / openSUSEzypper6.4.0-18, 5.14.21-150600.24Enterprise & community
Arch Linuxpacman6.14.4Bleeding edge

For undetected distributions: Verify the kernel version manually. Kernels >= 6.14.4 are generally considered safe.


Manual Patch Guide

If you prefer manual patching or automatic patching fails, follow the per-distro guide:

Ubuntu / Debian

root@kitploit:~
sudo apt update
sudo apt upgrade linux-image-generic kmod
sudo reboot

RHEL 8+ / CentOS Stream / AlmaLinux / Rocky

root@kitploit:~
sudo dnf clean metadata
sudo dnf upgrade kernel
sudo reboot

Fedora

root@kitploit:~
sudo dnf upgrade kernel
sudo reboot

Amazon Linux 2023 / 2

root@kitploit:~
sudo dnf upgrade kernel
sudo reboot

SUSE / openSUSE

root@kitploit:~
sudo zypper update kernel-default
sudo reboot

Arch Linux

root@kitploit:~
sudo pacman -Syu linux linux-headers
sudo reboot

Temporary Mitigation

If you cannot reboot immediately for a kernel upgrade, apply the mitigation:

root@kitploit:~
# Disable the algif_aead module via modprobe.d
echo 'install algif_aead /bin/false' | sudo tee /etc/modprobe.d/disable-algif_aead.conf

# Unload the module if already loaded
sudo rmmod algif_aead 2>/dev/null || echo "Module not loaded"

IMPORTANT:

  • Mitigation is only a temporary fix
  • Do not rely on this as a long-term solution
  • Still schedule a kernel upgrade as soon as possible
  • On RHEL-family systems with CONFIG_CRYPTO_USER_API_AEAD=y, the module is built into the kernel, so modprobe.d is ineffective → a kernel upgrade is the only solution

Troubleshooting

1. Connection Timeout

root@kitploit:~
Error: SSH port is not open

Solution:

  • Check whether the SSH port is open: nc -zv <IP> 22
  • Verify firewall rules
  • Use --port if SSH runs on a custom port

2. Authentication Failed

root@kitploit:~
Error: SSH authentication failed

Solution:

  • Verify SSH key permissions: chmod 600 ~/.ssh/id_rsa
  • Test the connection manually: ssh -i ~/.ssh/id_rsa user@host
  • Use --password if you prefer password authentication
  • Check whether the user is set up on the remote host

3. Permission Denied during Patching

root@kitploit:~
Exit code 1: dpkg: error processing...

Solution:

  • Ensure the user has sudo access (preferably passwordless sudo)
  • Check the sudoers file: sudo visudo
  • For full patch automation, the user must be able to run apt/dnf/yum without a password prompt

4. Repeated Retries

root@kitploit:~
Retry: 3x | Host temporary unavailable

Solution:

  • Network instability, wait a moment
  • Reduce the thread count: --threads 10
  • Check host health and SSH daemon status

5. "Unknown Distro"

root@kitploit:~
Status: ? UNKNOWN

Solution:

  • Kernels >= 6.14.4 are considered safe
  • Verify manually: uname -r and compare with the advisory
  • Add to PATCHED_KERNEL_MAP if necessary

6. Patch Failed

root@kitploit:~
Exit code 1: Failed to lock apt database

Solution:

  • The host is running another package manager
  • Wait or run the patch manually during off-peak hours
  • Check logs: sudo tail -f /var/log/apt/term.log

Security References

Official CVE Information

  • NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-31431
  • copy.fail: https://copy.fail (official advisory)

Vendor Security Advisories

  • Ubuntu: https://ubuntu.com/security/CVE-2026-31431
  • Red Hat: https://access.redhat.com/security/cve/cve-2026-31431
  • AlmaLinux: https://almalinux.org/blog/2026-05-01-cve-2026-31431-copy-fail/
  • Debian: https://security-tracker.debian.org/tracker/CVE-2026-31431

Technical Details

  • CVSS Score: 7.8 HIGH
  • Attack Vector: Local
  • Privileges Required: Low
  • User Interaction: None
  • Impact: Complete system compromise (confidentiality, integrity, availability)

Kernel Patch References

  • Linux Kernel Git: https://github.com/torvalds/linux/commit/... (specific patch hash)
  • LKML Discussion: https://lkml.org/ (kernel mailing list)

License & Disclaimer

Internal Use Only — This tool is intended solely for audit and patch management purposes by authorized sysadmins.

root@kitploit:~
DISCLAIMER:
- Use only on systems you own or have explicit authorization to access
- Automatic patching and reboots can cause downtime
- Test in a staging environment before production deployment
- Ensure backups are available before patching
- The developer is not responsible for data loss or service disruption

Contribution & Support

Author: GagalTotal
Repository: https://github.com/gagaltotal/cve-2026-31431-copy-fail
Contact: ghostgtr666

For bug reports, feature requests, or questions:

  1. Open a GitHub Issue
  2. Include the output log and environment details
  3. Be specific and provide reproducible steps

Last Updated: May 8, 2026
Scanner Version: 1.0

Download Tool