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-21012-Rust-serde-Deserialization-of-Untrusted-Enum-Variant-Injection- — Demonstrates CVE-2026-21012, a Rust serde deserialization flaw where untrusted JSON can trigger unintended enum variants and unauthorized actions. | Kitploit
Tools/GitHubGitHub/george0papasotiriou/cve-2026-21012-rust-serde-deserialization-of-untrusted-enum-variant-injection-
Vulnerability AnalysisCode AnalysisExploitationLearning & Education
GitHubgeorge0papasotiriou/cve-2026-21012-rust-serde-deserialization-of-untrusted-enum-variant-injection-

CVE-2026-21012-Rust-serde-Deserialization-of-Untrusted-Enum-Variant-Injection-

Demonstrates CVE-2026-21012, a Rust serde deserialization flaw where untrusted JSON can trigger unintended enum variants and unauthorized actions.

View Repository
343 months agoNot yet reviewed
Share

CVE-2026-21012 – Rust serde Deserialization of Untrusted Enum (Variant Injection)

Program Code (Rust)

// serde_vuln.rs - Deserializes an enum from user JSON without validation
use serde::{Deserialize, Serialize};
use serde_json;

#[derive(Deserialize, Debug)]
enum AdminAction {
    ReadLogs,
    DeleteUser(String),
    CreateUser(String),
}

#[derive(Deserialize, Debug)]
struct Command {
    action: AdminAction,
}

fn main() {
    let user_input = r#"{"action": {"DeleteUser": "admin"}}"#;
    let cmd: Command = serde_json::from_str(user_input).unwrap();
    println!("Executing: {:?}", cmd.action);
    // Could delete admin if permissions not checked!
}

CVE-2026-21012 – Rust serde Deserialization of Untrusted Enum

Severity: High

Overview

A Rust application using serde deserializes untrusted JSON into an enum without validating that the caller is authorized for the variant. An attacker can inject a different enum variant (e.g., DeleteUser) and trigger unintended actions.

Vulnerability Details

  • Type: Insecure Deserialization / Type Confusion
  • Impact: Unauthorized action execution.
  • Root Cause: The application does not check whether the deserialized enum variant matches the expected limited set for the user’s role.

Exploit Demonstration

Compile and run the Rust program:

cargo add serde serde_json
rustc serde_vuln.rs
./serde_vuln

It executes the DeleteUser variant without authorization.

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.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    597
  • 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.

    396
  • 4

    ARTEX

    baarai/artex

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

    319
  • 5

    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.

    274
  • 6

    Aliens_eye

    arxhr007/aliens_eye

    AI powered OSINT engine to discover and map 7,700+ social media identities across the web

    260

Explore all tools

Browse our collection of tools

View all tools →