Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-12487

CVE-2025-12487: Text-Generation-WebUI RCE Vulnerability

CVE-2025-12487 is a remote code execution flaw in oobabooga text-generation-webui caused by improper validation of the trust_remote_code parameter. This article covers the technical details, exploitation risks, and mitigation.

Published: April 1, 2026

CVE-2025-12487 Overview

CVE-2025-12487 is a critical remote code execution vulnerability in oobabooga text-generation-webui, a popular open-source web interface for running large language models. This vulnerability allows remote attackers to execute arbitrary code on affected installations without requiring authentication. The flaw exists within the handling of the trust_remote_code parameter provided to the join endpoint, where the lack of proper validation of user-supplied arguments before loading a model creates a dangerous attack surface.

Critical Impact

Unauthenticated remote attackers can achieve full code execution in the context of the service account, potentially leading to complete system compromise of servers running text-generation-webui.

Affected Products

  • oobabooga text-generation-webui (versions prior to the security patch)
  • Installations with the join endpoint accessible to untrusted users
  • Deployments exposing the web interface without additional access controls

Discovery Timeline

  • 2025-11-06 - CVE-2025-12487 published to NVD
  • 2025-11-12 - Last updated in NVD database

Technical Details for CVE-2025-12487

Vulnerability Analysis

This vulnerability is classified under CWE-807 (Reliance on Untrusted Inputs in a Security Decision). The text-generation-webui application accepts user-controlled input through the trust_remote_code parameter at the join endpoint. When this parameter is enabled, the application allows the execution of arbitrary Python code that may be bundled with a model from remote repositories like Hugging Face. The fundamental issue is that the application permits this security-sensitive setting to be modified via the UI or API, rather than restricting it to command-line configuration only.

The vulnerability is network-accessible without authentication, requires no user interaction, and results in high impact to confidentiality, integrity, and availability of the affected system. An attacker can leverage this flaw to execute code within the context of the service account running the text-generation-webui process.

Root Cause

The root cause lies in the application's failure to make the --trust-remote-code flag immutable from the UI and API. Prior to the patch, the trust_remote_code parameter was included in the list of configurable loader options for various model loaders, allowing any user with access to the web interface to enable this dangerous setting. This architectural flaw violates the principle of least privilege by exposing a security-critical configuration option through untrusted input channels.

Attack Vector

An attacker can exploit this vulnerability by:

  1. Accessing the text-generation-webui join endpoint remotely
  2. Submitting a request that sets the trust_remote_code parameter to true
  3. Loading a malicious model that contains arbitrary Python code
  4. Achieving code execution when the application loads the model with remote code enabled

The attack requires no authentication, making any publicly accessible or internally reachable text-generation-webui instance vulnerable.

python
# Security patch in modules/loaders.py - Make --trust-remote-code immutable from the UI/API
         'disk',
         'use_double_quant',
         'bf16',
-        'trust_remote_code',
         'no_use_fast',
     ],
     'ExLlamav3_HF': [
         'ctx_size',
         'cache_type',
         'gpu_split',
         'cfg_cache',
-        'trust_remote_code',
         'no_use_fast',
         'enable_tp',
         'tp_backend',

Source: GitHub Commit Update

The patch removes trust_remote_code from the configurable options in various loader configurations, preventing users from enabling this setting through the web interface or API.

python
# Security patch in modules/shared.py - Make --trust-remote-code immutable from the UI/API
 
 
args = parser.parse_args()
+original_args = copy.deepcopy(args)
args_defaults = parser.parse_args([])
 
# Create a mapping of all argument aliases to their canonical names

Source: GitHub Commit Update

This portion of the patch preserves the original command-line arguments, ensuring that security-sensitive settings like trust_remote_code can only be set at application startup and cannot be modified at runtime.

Detection Methods for CVE-2025-12487

Indicators of Compromise

  • Unexpected model loading activity with trust_remote_code enabled in application logs
  • Unusual outbound network connections from the text-generation-webui process
  • Process spawning or file system modifications by the service account running text-generation-webui
  • API requests to the join endpoint containing the trust_remote_code parameter

Detection Strategies

  • Monitor web application logs for requests containing trust_remote_code=true or similar parameters
  • Implement network segmentation to detect unexpected communication from AI/ML inference servers
  • Deploy endpoint detection solutions to identify code execution originating from the Python process
  • Review Hugging Face model download logs for models from untrusted or suspicious repositories

Monitoring Recommendations

  • Enable verbose logging for the text-generation-webui application to capture all API requests
  • Set up alerts for process creation events under the text-generation-webui service account
  • Monitor file integrity on systems running text-generation-webui deployments
  • Implement network monitoring to detect connections to known malicious model repositories

How to Mitigate CVE-2025-12487

Immediate Actions Required

  • Update text-generation-webui to the latest version containing commit b5a6904c4ac4049823396090360b6f566f4e4603
  • Restrict network access to text-generation-webui instances using firewall rules or reverse proxy authentication
  • Review application logs for any signs of exploitation attempts
  • Audit any models loaded with trust_remote_code enabled for malicious content

Patch Information

The vulnerability has been addressed in a security patch available via the GitHub commit. The fix makes the --trust-remote-code flag immutable from the UI and API, ensuring this security-sensitive setting can only be configured at application startup via command-line arguments. Additional details are available in the Zero Day Initiative Advisory ZDI-25-982.

Workarounds

  • Deploy text-generation-webui behind a reverse proxy with authentication requirements
  • Use network segmentation to isolate AI/ML inference servers from untrusted networks
  • If trust_remote_code functionality is not required, ensure the flag is never passed at startup
  • Implement strict access controls limiting which users can interact with the web interface
bash
# Configuration example - Running text-generation-webui with restricted access
# Use a reverse proxy (nginx) to add authentication
server {
    listen 443 ssl;
    server_name llm.internal.example.com;
    
    # Require authentication for all requests
    auth_basic "Restricted Access";
    auth_basic_user_file /etc/nginx/.htpasswd;
    
    location / {
        proxy_pass http://127.0.0.1:7860;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechOobabooga

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability1.36%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-807
  • Technical References
  • GitHub Commit Update

  • Zero Day Initiative Advisory
  • Related CVEs
  • CVE-2026-35486: Oobabooga Text Generation SSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English