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-42945-NGINX-Rift-Toolkit — Automated toolkit for scanning, exploiting, and patching CVE-2026-42945 (critical RCE in nginx). Includes network scanner, heap spray exploit, and batch patcher with HTML/JSON reporting. | Kitploit
Tools/GitHubGitHub/gagaltotal/cve-2026-42945-nginx-rift-toolkit
Vulnerability ScannersNetwork MappingExploitationConfiguration AuditingWeb SecurityPenetration Testing
GitHubgagaltotal/cve-2026-42945-nginx-rift-toolkit

CVE-2026-42945-NGINX-Rift-Toolkit

Automated toolkit for scanning, exploiting, and patching CVE-2026-42945 (critical RCE in nginx). Includes network scanner, heap spray exploit, and batch patcher with HTML/JSON reporting.

View RepositoryWebsite
4143 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-42945 Nginx Rift Vulnerability Toolkit

CVSS Score: 9.8 - Critical Python Version License

Comprehensive toolkit for scanning, patching, and testing CVE-2026-42945 - a critical RCE vulnerability in nginx

Table of Contents

  • Overview
  • CVE Details
  • Features
  • Toolkit Components
  • Requirements
  • Installation
  • Usage
  • Workflow Examples
  • Security Considerations
  • Troubleshooting
  • Contributing

Overview

This toolkit provides comprehensive tools for scanning, patching, and testing CVE-2026-42945, a critical Remote Code Execution vulnerability in nginx that affects versions prior to 1.26.3 (mainline) and 1.24.1 (stable).

The vulnerability exploits malformed HTTP/2 header parsing when ASLR is disabled using heap spray techniques.

CVE Details

PropertyValue
Vulnerability IDCVE-2026-42945
TypeRemote Code Execution (RCE)
CVSS Score9.8 (Critical)
Affected Versions< 1.26.3 (mainline) / < 1.24.1 (stable)
Fixed Version1.26.3+
Attack VectorMalformed HTTP/2 header parsing
PrerequisiteASLR disabled on target system

Features

  • Network Scanning - CIDR subnet scanning with concurrent host discovery
  • Version Detection - Multi-distro nginx version identification via SSH
  • Automated Patching - Batch patch vulnerable instances across networks
  • Exploitation Testing - Verify vulnerability with heap spray techniques
  • Report Generation - HTML and JSON format reports
  • Dry-Run Mode - Preview changes before applying
  • Multi-Authentication - SSH key and password-based authentication
  • Audit Logging - Detailed timestamped operation logs

Toolkit Components

1. nginx_scanner.py - Vulnerability Scanner

Scans a subnet or single host to identify vulnerable nginx installations.

Features:

  • CIDR subnet scanning support
  • Concurrent host discovery and version detection
  • SSH-based remote version checking
  • Multi-distro support (Ubuntu, Debian, CentOS, AlmaLinux, RHEL)
  • HTML and JSON report generation
  • Customizable SSH ports and authentication methods

2. nginx_patcher.py - Patch Automation

Automatically patches vulnerable nginx instances to the latest secure version.

Features:

  • Batch patching across subnet ranges
  • Distro-specific patch commands
  • Dry-run mode for safety validation
  • Target version specification
  • Detailed patch execution logs
  • Progress tracking and reporting

3. exploit.py - Remote Code Execution Exploit

Tests the CVE-2026-42945 vulnerability via heap spray technique.

Features:

  • Targets nginx instances with ASLR disabled
  • Heap spray buffer overflow exploitation
  • Multiple offset support for reliability
  • Remote command execution capability
  • Connection timeout and retry mechanisms
  • Detailed execution statistics

Supported Distributions

  • Ubuntu (all versions with nginx)
  • Debian (all versions with nginx)
  • CentOS 7+
  • AlmaLinux
  • RHEL (Red Hat Enterprise Linux)

Requirements

  • Python: 3.7 or higher
  • OS: Linux/Unix environment

Dependencies

root@kitploit:~
paramiko (>= 3.0.0) - SSH client library
rich (>= 13.0.0) - Terminal formatting and progress bars

Installation

Step 1: Clone or Download

root@kitploit:~
git clone https://github.com/gagaltotal/CVE-2026-42945-NGINX-Rift-Toolkit
cd CVE-2026-42945-NGINX-Rift-Toolkit

Step 2: Create Virtual Environment

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

Step 3: Install Dependencies

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

Usage

Screen Capture

Scanner (nginx_scanner.py)

Basic Subnet Scan

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

Single Host Scan

root@kitploit:~
python3 nginx_scanner.py --subnet 192.168.1.10 --user root --key ~/.ssh/id_rsa

Password-based Authentication

root@kitploit:~
python3 nginx_scanner.py --subnet 10.0.0.0/30 --user admin --password "password"

Custom SSH Port

root@kitploit:~
python3 nginx_scanner.py --subnet 192.168.1.0/24 --port 2222 --user root --key ~/.ssh/id_rsa

Generate HTML Report

root@kitploit:~
python3 nginx_scanner.py --subnet 192.168.1.0/24 --user root --key ~/.ssh/id_rsa --output report.html

Scanner Options

root@kitploit:~
--subnet SUBNET              Target subnet in CIDR format (required)
--user USER                  SSH username (default: root)
--password PASSWORD          SSH password
--key KEY_PATH              Path to SSH private key
--port PORT                 SSH port (default: 22)
--timeout TIMEOUT           Connection timeout in seconds (default: 5)
--output FILE               Output report file (HTML/JSON)
--workers WORKERS           Number of concurrent threads (default: 20)

Patcher (nginx_patcher.py)

Screen Capture

Basic Patching

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

Dry-Run (Preview without Applying)

root@kitploit:~
python3 nginx_patcher.py --subnet 192.168.1.0/24 --user root --key ~/.ssh/id_rsa --dry-run

Target Specific Version

root@kitploit:~
python3 nginx_patcher.py --subnet 192.168.1.0/24 --target-version 1.26.3 --user root --key ~/.ssh/id_rsa

Custom SSH Port

root@kitploit:~
python3 nginx_patcher.py --subnet 10.0.0.0/30 --port 2222 --user admin --password "password"

Patcher Options

root@kitploit:~
--subnet SUBNET              Target subnet in CIDR format (required)
--user USER                  SSH username (default: root)
--password PASSWORD          SSH password
--key KEY_PATH              Path to SSH private key
--port PORT                 SSH port (default: 22)
--timeout TIMEOUT           Connection timeout in seconds (default: 30)
--target-version VERSION    Nginx version to patch to (default: latest)
--dry-run                   Show what would be patched without executing
--workers WORKERS           Number of concurrent threads (default: 10)

Exploit (exploit.py)

Screen Capture

Exploit Single Target

root@kitploit:~
python3 exploit.py --target 192.168.1.100 --port 80

With Custom Payload

root@kitploit:~
python3 exploit.py --target 192.168.1.100 --port 80 --command "cat /etc/passwd"

Multiple Spray Attempts

root@kitploit:~
python3 exploit.py --target 192.168.1.100 --port 80 --spray 50

Detailed Output

root@kitploit:~
python3 exploit.py --target 192.168.1.100 --port 80 --verbose

Exploit Options

root@kitploit:~
--target HOST               Target host IP or domain (required)
--port PORT                 Target port (default: 80)
--command CMD               Command to execute
--spray NUM                 Number of heap spray attempts (default: 20)
--timeout TIMEOUT           Connection timeout in seconds (default: 5)
--tries NUM                 Number of exploitation attempts (default: 10)
--verbose                   Enable verbose output

Workflow Examples

Scenario 1: Complete Security Assessment

root@kitploit:~
# Step 1: Scan network for vulnerable instances
python3 nginx_scanner.py --subnet 10.0.0.0/24 --user admin --key ~/.ssh/key --output scan_results.html

# Step 2: Review scan results in scan_results.html

# Step 3: Patch vulnerable instances
python3 nginx_patcher.py --subnet 10.0.0.0/24 --user admin --key ~/.ssh/key

# Step 4: Verify patches applied by running scanner again
python3 nginx_scanner.py --subnet 10.0.0.0/24 --user admin --key ~/.ssh/key

Scenario 2: Emergency Patching

root@kitploit:~
# Step 1: Dry-run to see what would be patched
python3 nginx_patcher.py --subnet 192.168.1.0/24 --user root --key ~/.ssh/id_rsa --dry-run

# Step 2: Apply patches
python3 nginx_patcher.py --subnet 192.168.1.0/24 --user root --key ~/.ssh/id_rsa

Scenario 3: Testing on Vulnerable System

root@kitploit:~
# Step 1: First verify the system is vulnerable
python3 exploit.py --target 10.0.0.50 --port 80 --verbose

# Step 2: If successful, immediate patching is recommended
python3 nginx_patcher.py --subnet 10.0.0.50 --user root --key ~/.ssh/id_rsa

Security Considerations

ConsiderationDetails
SSH Key ManagementStore SSH keys securely, never commit to repositories
Network AccessEnsure proper network segmentation for production use
Testing EnvironmentAlways test in non-production environment first
LoggingAll operations generate detailed logs for audit trail
ASLR StatusExploit tool requires ASLR to be disabled on target
Dry-run ModeUse --dry-run flag to preview changes before applying
BackupAlways backup nginx configuration before patching

Authentication Methods

SSH Key-based (Recommended)

root@kitploit:~
python3 nginx_scanner.py --subnet 10.0.0.0/24 --user root --key ~/.ssh/id_rsa

Password-based

root@kitploit:~
python3 nginx_scanner.py --subnet 10.0.0.0/24 --user root --password "password"

Custom SSH Port

root@kitploit:~
python3 nginx_scanner.py --subnet 10.0.0.0/24 --user root --key ~/.ssh/id_rsa --port 2222

Troubleshooting

SSH Connection Issues

  • SSH key permissions: chmod 600 ~/.ssh/id_rsa
  • SSH service: Check SSH service is running on target
  • SSH port: Verify SSH port is correct (default: 22)
  • Firewall: Ensure firewall allows SSH connections

Version Detection Fails

  • Nginx installed: Confirm nginx is installed on target
  • Privileges: Verify user has sudo privileges or direct root access
  • Network: Check network connectivity to target hosts

Patching Failures

  • Dry-run test: Use --dry-run to identify issues without applying
  • Internet: Ensure target systems have internet connectivity for package downloads
  • Package manager: Verify package manager is working on targets
  • Disk space: Check disk space on target systems

Output Reports

Scanner generates detailed reports in multiple formats:

FormatDescription
HTML ReportBrowser-viewable with vulnerability summary, affected hosts, version details
JSON ReportMachine-readable format with full technical details
Console OutputReal-time progress with color-coded results

Logging

All operations are logged with timestamps for audit compliance. Check console output for detailed execution information.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -am 'Add improvement')
  4. Push to the branch (git push origin feature/improvement)
  5. Open a Pull Request

Disclaimer

This toolkit is provided for authorized security testing and vulnerability assessment only. Unauthorized access to computer systems is illegal. Users are responsible for ensuring they have proper authorization before using this toolkit.

Author

gagaltotal - GitHub

License

This project is licensed under the MIT License - see the LICENSE file for details.


Last Updated: 2026-05-20

Download Tool