Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-41940_exploit — Python exploit for CVE-2026-41940, a critical CRLF injection in cPanel/WHM cpsrvd that bypasses authentication and 2FA, granting root-level access via a 4-step HTTP attack chain. | Kitploit
Tools/GitHubGitHub/george1-adel/cve-2026-41940_exploit
Authentication & AuthorizationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRed TeamingPayload Development
GitHub
Share
george1-adel/cve-2026-41940_exploit

CVE-2026-41940_exploit

Python exploit for CVE-2026-41940, a critical CRLF injection in cPanel/WHM cpsrvd that bypasses authentication and 2FA, granting root-level access via a 4-step HTTP attack chain.

View Repository
2554 months agoNot yet reviewed

============================================================================= CVE-2026-41940 - cPanel & WHM Authentication Bypass Exploit

Vulnerability: Session-file manipulation through CRLF injection in cpsrvd's HTTP Basic authentication handler CVE: CVE-2026-41940 CVSS: 9.8 (Critical) CWE: CWE-93 (CRLF Injection) / CWE-306 (Missing Authentication) Affected: cPanel & WHM versions prior to: 11.110.0.97, 11.118.0.63, 11.126.0.54, 11.132.0.29, 11.134.0.20, 11.136.0.5 Ports: 2082/2083 (cPanel), 2086/2087 (WHM), 2095/2096 (Webmail)

TECHNICAL ROOT CAUSE: cpsrvd's HTTP Basic auth handler stores the supplied password verbatim into the pre-authentication session file via Cpanel::Session::saveSession() -- bypassing the sanitising Cpanel::Session::create() / Cpanel::Session::Modify::save() wrappers, which call filter_sessiondata() to strip CR/LF. Because saveSession() itself does not call filter_sessiondata(), any CR/LF in the password is written to the raw session file as literal newlines.

When a request is rejected for failing the URL-bound security-token check, cpsrvd's do_token_denied() handler invokes Cpanel::Session::Modify::new($session, nocache => 1). The nocache => 1 flag forces a re-parse of the raw session file (line-by-line key=value) instead of loading the JSON cache. CRLF-split lines from the attacker- controlled pass field are now treated as separate key=value records. Modify::save() then rewrites the JSON cache with all parsed keys -- including the attacker's -- promoted to top-level session entries.

After the regen, the session contains user=root, hasroot=1, tfa_verified=1, an attacker-chosen cp_security_token, and a fresh successful_internal_auth_with_timestamp. cpsrvd treats the session as fully authenticated.

ATTACK CHAIN (4 HTTP requests):

  1. Pre-auth session mint: POST /login/?login_only=1 (failed login) -> creates session file, get whostmgrsession cookie
  2. CRLF injection: GET / with Authorization: Basic header containing CRLF payload, cookie WITHOUT obfuscation suffix -> password with embedded \r\n written to raw session file
  3. Regen trigger: GET /cpsess/scripts2/listaccts -> do_token_denied() fires, re-parses raw file, promotes injected keys
  4. Authenticated access: GET /cpsess/json-api/version -> session now has root privileges, bypasses password & 2FA

NOTE: There is a race condition due to Perl's randomized hash iteration order. The original (unset) cp_security_token may overwrite the injected one. Multiple retries make the chain reliable.

DISCLAIMER: This tool is provided for authorized security testing and research purposes only. Unauthorized use against systems you do not own or have explicit permission to test is illegal.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    513
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    471
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    345
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    311
  • 5

    estorides

    grisuno/estorides

    Aggregates 99+ free OSINT sources in parallel, resolves entities into a knowledge graph, and exports STIX 2.1, MISP, or GraphML with LLM-assisted analysis.

    303
  • 6

    opencti

    opencti-platform/opencti

    Open Cyber Threat Intelligence Platform

    303

Explore all tools

Browse our collection of tools

View all tools →