Skip to main content
Vulnerability Database/CVE-2025-62364

CVE-2025-62364: text-generation-webui LFI Vulnerability

CVE-2025-62364 is a Local File Inclusion flaw in text-generation-webui allowing attackers to read sensitive server files through symbolic link uploads. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-62364 Overview

CVE-2025-62364 is a Local File Inclusion (LFI) vulnerability in text-generation-webui, an open-source web interface for running Large Language Models (LLMs). The flaw affects all versions through 3.13 and resides in the character picture upload feature. An attacker can upload a text file containing a symbolic link to an arbitrary file path on the host. When the application processes the upload, it follows the symlink and serves the contents of the targeted file through the web interface. The issue is tracked as [CWE-59: Link Following] and is fixed in version 3.14.

Critical Impact

Attackers can read arbitrary files on the server, including system configurations and credentials, by abusing symbolic link handling in the character profile picture upload.

Affected Products

  • oobabooga/text-generation-webui versions through 3.13
  • Character picture upload component in modules/chat.py
  • UI upload handlers in modules/ui_chat.py (upload_img_bot, upload_img_tavern)

Discovery Timeline

  • 2025-10-13 - CVE-2025-62364 published to NVD
  • 2026-10-08 - Last updated in NVD database

Technical Details for CVE-2025-62364

Vulnerability Analysis

The vulnerability exists in the character profile picture upload workflow. The web interface accepted uploaded files and processed them without validating whether the path represented a symbolic link to a resource outside the intended upload directory. When a user submits a crafted file containing a symlink, the application resolves the link and returns the contents of the target file through the web UI.

Because the application processes the upload without authentication requirements for this feature, an attacker with local network access to the Gradio interface can retrieve arbitrary readable files on the host. This includes application configuration files, SSH keys, environment files containing API tokens, and operating system files such as /etc/passwd.

Root Cause

The Gradio gr.Image components used for profile and TavernAI uploads were configured with type='pil', which caused the backend to accept and process file content without constraining it to a safe image pipeline. Combined with downstream file handling that followed symbolic links, this allowed symlink traversal [CWE-59] out of the intended directory.

Attack Vector

An attacker uploads a payload through the character picture upload endpoint containing a symbolic link to a sensitive file (for example /etc/shadow or ~/.ssh/id_rsa). The server-side handler resolves the link during processing and exposes the file contents in the response rendered by the web interface. No authentication is required for the vulnerable upload path.

python
# Security patch in modules/ui_chat.py - switch Gradio Image component
# from in-memory PIL handling to filepath handling, enabling safer
# server-side validation of the uploaded resource.

with gr.Tab('YAML or JSON'):
    with gr.Row():
        shared.gradio['upload_json'] = gr.File(type='binary', file_types=['.json', '.yaml'], label='JSON or YAML File', interactive=not mu)
-       shared.gradio['upload_img_bot'] = gr.Image(type='pil', label='Profile Picture (optional)', interactive=not mu)
+       shared.gradio['upload_img_bot'] = gr.Image(type='filepath', label='Profile Picture (optional)', interactive=not mu)

with gr.Tab('TavernAI PNG'):
    with gr.Row():
        with gr.Column():
-           shared.gradio['upload_img_tavern'] = gr.Image(type='pil', label='TavernAI PNG File', elem_id='upload_img_tavern', interactive=not mu)
+           shared.gradio['upload_img_tavern'] = gr.Image(type='filepath', label='TavernAI PNG File', elem_id='upload_img_tavern', interactive=not mu)

Source: GitHub Commit 282aa19

Detection Methods for CVE-2025-62364

Indicators of Compromise

  • Uploaded files in the characters/ directory that are symbolic links rather than regular image or JSON files.
  • Web access logs showing repeated POST requests to the character upload endpoint followed by GET requests retrieving character picture assets.
  • Unexpected read access to sensitive system files (/etc/passwd, /etc/shadow, ~/.ssh/*, .env) by the user account running text-generation-webui.

Detection Strategies

  • Monitor the text-generation-webui installation directory for files whose inode type is a symbolic link rather than a regular file.
  • Audit HTTP request bodies to the Gradio upload handlers for payloads referencing absolute paths or traversal sequences.
  • Correlate process-level file reads from the Python interpreter running text-generation-webui with sensitive paths outside the application tree.

Monitoring Recommendations

  • Enable filesystem auditing (auditd on Linux) for read access to credential and configuration files under /etc, /root, and user home directories.
  • Log all requests to Gradio endpoints behind a reverse proxy with request body logging enabled.
  • Alert on outbound network traffic from the host that follows upload activity, which may indicate exfiltration of harvested file contents.

How to Mitigate CVE-2025-62364

Immediate Actions Required

  • Upgrade text-generation-webui to version 3.14 or later, which contains the fix in commit 282aa19.
  • Restrict network access to the Gradio interface so it is not exposed to untrusted networks.
  • Run the application as an unprivileged user with no read access to sensitive files or secrets.

Patch Information

The fix is included in text-generation-webui version 3.14. The patch changes the Gradio gr.Image component type from pil to filepath and adds os and shutil imports in modules/chat.py to enable safer server-side handling of uploaded profile pictures. See the GitHub Security Advisory GHSA-66rw-q8w5-c2hg for details.

Workarounds

  • No official workarounds exist per the vendor advisory; upgrading to 3.14 is required.
  • As an interim control, place the service behind an authenticated reverse proxy and disable the character upload UI if it is not needed.
  • Run the service inside a container or sandbox with a read-only root filesystem and no mounted secrets.
bash
# Upgrade text-generation-webui to the patched release
git -C text-generation-webui fetch --tags
git -C text-generation-webui checkout v3.14

# Verify the patched commit is present
git -C text-generation-webui log --oneline | grep 282aa19

# Audit the characters directory for symlinks planted pre-patch
find text-generation-webui/characters -type l -ls

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.