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-123158-sshole-safe-rust — Forensic analysis of CVE-2026-123158 (OpenSSH/musl auth bypass) with a Safe Rust immunity proof, hardened C99 reference implementation, and drop-in patch. | Kitploit
Tools/GitHubGitHub/coboliqcom/cve-2026-123158-sshole-safe-rust
Static AnalysisVulnerability AnalysisCode AnalysisCryptographyAuthenticationPapers & ResearchLearning & Education
GitHubcoboliqcom/cve-2026-123158-sshole-safe-rust

cve-2026-123158-sshole-safe-rust

Forensic analysis of CVE-2026-123158 (OpenSSH/musl auth bypass) with a Safe Rust immunity proof, hardened C99 reference implementation, and drop-in patch.

View Repository
214 days agoNot yet reviewed
Share

CVE-2026-123158 ("sshole") — Deterministic Safe Rust Immunity Proof

CI Safe Rust License

Forensic decompilation, architectural vulnerability analysis, and 100% Safe Rust (#![forbid(unsafe_code)]) formal verification proof for CVE-2026-123158 (colloquially dubbed "sshole" / *sshole), synthesized via the DecodeIQ CodeTruth Engine (AST-SLS Synaptic Topology).


1. Executive Forensic Summary

On November 5, 2026, security researcher Özgün Kültekin disclosed a critical remote authentication bypass (CVE-2026-123158, CVSS 8.1) in OpenSSH (sshd) on Linux systems utilizing musl libc without PAM (most notably default installations of Alpine Linux 3.16 through edge).

The vulnerability allows remote, unauthenticated attackers to obtain unauthorized root or target account access on systems where the target account has password login disabled (designated by an asterisk * in /etc/shadow) simply by sending an oversized password between 257 and 1,024 bytes.


2. Anatomical Breakdown: The C99 Type-Confusion & In-Band Sentinel Collision

The bug originates from a lethal interaction between C99's lack of algebraic sum types, an in-band sentinel error convention in musl libc, and OpenSSH's user-enumeration defense logic:

[Attacker sends 300 'A's]
         │
         ▼
[OpenSSH auth-passwd.c]
         │
         ▼
[musl crypt() SHA-512] ──(Input > 256 bytes!)──► Returns "*" as error token string
         │
         ▼
[OpenSSH evaluates]: return encrypted != NULL && strcmp(encrypted, pw_passwd) == 0;
         │
         ▼
Target account in /etc/shadow: root:*  ──► pw_passwd is "*"
         │
         ▼
strcmp("*", "*") == 0  ──►  TRUE! ACCESS GRANTED AS ROOT!

The C Flaw:

/* OpenSSH auth-passwd.c (Prior to commit 4353fdc / 10.6p2) */
return encrypted_password != NULL &&
       strcmp(encrypted_password, pw_password) == 0;

In C, raw char* pointers conflate valid data with error states. musl libc signaled an out-of-band error via an in-band string literal *. Because Unix shadow files also use * to designate locked/disabled accounts, raw strcmp() evaluated them as identical.


3. How Safe Rust Solves This Class of Vulnerabilities by Design

In idiomatic, Safe Rust (#![forbid(unsafe_code)]), such a vulnerability is physically impossible to compile or execute:

  1. Strongly Typed Shadow Records: Account states are represented as algebraic sum types (enum ShadowState), not untyped strings:
    pub enum ShadowState {
        Disabled,            // Stored as "*" in shadow
        Locked,              // Stored as "!..." in shadow
        Empty,               // Passwordless
        Hashed(String),      // Valid salt + hash
    }
    
  2. Out-of-Band Error Propagation: musl_crypt_safe returns Result<String, CryptError>. Errors can never masquerade as hash output.
  3. Exhaustive Matching: A Disabled account rejects password authentication before any cryptographic hashing or string comparison takes place.

4. Test Verification Suite

All exploit vectors and edge cases are verified with 100% test passing and 0 warnings:

$ cargo test
running 5 tests
test tests::test_empty_password_handling ... ok
test tests::test_crypt_length_error_propagation ... ok
test tests::test_locked_account_with_exclamation_is_rejected ... ok
test tests::test_valid_user_authentication ... ok
test tests::test_exploit_cve_2026_123158_is_physically_impossible ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

$ cargo clippy -- -D warnings
Finished dev profile [unoptimized + debuginfo] in 0.60s (0 warnings)

5. Hardened C99 Reference & Patch

For legacy environments unable to migrate immediately to Safe Rust, a fail-closed hardened C99 implementation and diff patch are provided in c/:

  • c/auth_passwd_hardened.c: Defensive wrapper with fail-closed sentinel checks and timingsafe_bcmp().
  • c/sshole_c99_patch.diff: Minimal drop-in patch for OpenSSH auth-passwd.c.

6. License & Attribution

Synthesized by CobolIQ / DecodeIQ Research Labs.
Cheers from Poland :) Cobol.iQ IT Team 🦀🛡️
Licensed under the Apache License, Version 2.0.

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.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    371
  • 4

    redforge

    cybersecurity91/redforge

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

    336
  • 5

    ARTEX

    baarai/artex

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

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    322

Explore all tools

Browse our collection of tools

View all tools →