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 — Ansible playbooks to check and mitigate CVE-2026-31431 on Linux hosts, with scripts for local, remote, and containerized environments, including CI/CD integration. | Kitploit
Tools/GitHubGitHub/eximiait/cve-2026-31431
Cloud Infrastructure SecurityVulnerability ScannersContainer SecurityConfiguration AuditingDevSecOps
GitHubeximiait/cve-2026-31431

CVE-2026-31431

Ansible playbooks to check and mitigate CVE-2026-31431 on Linux hosts, with scripts for local, remote, and containerized environments, including CI/CD integration.

View Repository
3 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) Checker

Checks whether a Linux host is vulnerable to CVE-2026-31431 and applies mitigation.

Files

  • check_cve_2026_31431.yml - Ansible playbook to verify and patch
  • revert_cve_2026_31431.yml - Ansible playbook to undo mitigation
  • run_check.sh - Script to run verification locally or remotely
  • run_revert.sh - Script to undo changes locally or remotely

Execution examples

1. Check vulnerability (run_check.sh)

root@kitploit:~
./run_check.sh
# Select 'l' for local

Or directly:

root@kitploit:~
ansible-playbook -i "localhost," -c local --ask-become-pass check_cve_2026_31431.yml -v

2. Revert changes (run_revert.sh)

Undoes the mitigation applied by run_check.sh:

root@kitploit:~
./run_revert.sh
# Select 'l' for local

Or directly:

root@kitploit:~
ansible-playbook -i "localhost," -c local --ask-become-pass revert_cve_2026_31431.yml -v

The revert removes /etc/modprobe.d/disable-algif.conf and attempts to reload the algif_aead module.

2. Remote

root@kitploit:~
ansible-playbook -i "192.168.1.100," -u ubuntu --ask-become-pass check_cve_2026_31431.yml -v

With multiple hosts (create hosts.ini):

root@kitploit:~
[servers]
192.168.1.100
192.168.1.101
root@kitploit:~
ansible-playbook -i hosts.ini --ask-become-pass check_cve_2026_31431.yml -v

3. Revert changes (undo mitigation)

root@kitploit:~
./run_revert.sh
# Select 'l' for local

4. Inside a Docker container

root@kitploit:~
docker run -it --privileged ubuntu:22.04 /bin/bash
# Inside the container:
apt update && apt install -y ansible python3
# Copy the playbook to the container or use curl/wget
ansible-playbook -i "localhost," -c local check_cve_2026_31431.yml -v

Or by mounting the playbook from the host:

root@kitploit:~
docker run -it --privileged -v $(pwd)/check_cve_2026_31431.yml:/check.yml ubuntu:22.04
# Inside: ansible-playbook -i "localhost," -c local /check.yml -v

5. CI/CD Pipeline for Docker images

GitHub Actions (.github/workflows/check-cve.yml):

root@kitploit:~
name: Check CVE-2026-31431

on:
  push:
    branches: [ main ]
  pull_request:

jobs:
  check-vulnerability:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Build test image
        run: docker build -t test-image .

      - name: Check for CVE-2026-31431 in container
        run: |
          docker run --rm \
            -v ${{ github.workspace }}/check_cve_2026_31431.yml:/check.yml \
            test-image \
            /bin/bash -c "apt update && apt install -y ansible python3 && \
            echo 'no' | ansible-playbook -i 'localhost,' -c local /check.yml -v"

      - name: Fail if vulnerable
        run: |
          # The playbook must return != 0 if vulnerable
          # Or parse the output looking for "VULNERABLE"

GitLab CI (.gitlab-ci.yml):

root@kitploit:~
stages:
  - build
  - security

build_image:
  stage: build
  script:
    - docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .

check_cve:
  stage: security
  script:
    - docker run --rm -v $(pwd)/check_cve_2026_31431.yml:/check.yml $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
      /bin/bash -c "apt-get update && apt-get install -y ansible python3 && 
      ansible-playbook -i 'localhost,' -c local /check.yml -v | grep -q 'SAFE' || exit 1"
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'

Dockerfile with build-time verification:

root@kitploit:~
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y ansible python3 wget

# Copy and run check during build
COPY check_cve_2026_31431.yml /tmp/
RUN echo "no" | ansible-playbook -i "localhost," -c local /tmp/check_cve_2026_31431.yml -v | \
    grep -q "SAFE" || (echo "VULNERABLE - Fix before building" && exit 1)

# Rest of your image...

What run_check.sh does

  1. Checks whether the authencesn algorithm is accessible via AF_ALG
  2. If vulnerable, asks whether to apply mitigation:
    • Disables the algif_aead module (creates /etc/modprobe.d/disable-algif.conf)
    • Updates the kernel if available
  3. Re-checks after the patch

What run_revert.sh does

  1. Removes /etc/modprobe.d/disable-algif.conf
  2. Attempts to reload the algif_aead module
  3. Checks whether the system becomes vulnerable again

What the playbook does

  1. Checks whether the authencesn algorithm is accessible via AF_ALG
  2. If vulnerable, asks whether to apply mitigation:
    • Disables the algif_aead module
    • Updates the kernel if available
  3. Re-checks after the patch

Expected result

root@kitploit:~
Status: SAFE - System is protected

© 2026 EximiaIT

Security Assessment Tool – CVE-2026-31431 (Copy Fail)

This project is intended for authorized security testing, auditing, and educational purposes only. Any use of this software without proper authorization is strictly prohibited.

EximiaIT assumes no liability for misuse or damages resulting from this tool.

Download Tool