Description
oobabooga text-generation-webui trust_remote_code Reliance on Untrusted Inputs Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of oobabooga text-generation-webui. Authentication is not required to exploit this vulnerability. The specific flaw exists within the handling of the trust_remote_code parameter provided to the join endpoint. The issue results from the lack of proper validation of a user-supplied argument before using it to load a model. An attacker can leverage this vulnerability to execute code in the context of the service account. Was ZDI-CAN-26681.
EPSS Score:
0%
Comprehensive Technical Analysis of EUVD-2025-38158
1. Vulnerability Assessment and Severity Evaluation
The vulnerability EUVD-2025-38158, also known as CVE-2025-12487, is a critical remote code execution (RCE) flaw in the oobabooga text-generation-webui software. The vulnerability arises from the improper handling of the trust_remote_code parameter in the join endpoint, which allows remote attackers to execute arbitrary code without authentication.
Severity Evaluation:
- CVSS Base Score: 9.8
- CVSS Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
The high base score of 9.8 indicates a critical vulnerability. The CVSS vector breakdown shows that the vulnerability can be exploited over the network (AV:N), requires low complexity (AC:L), does not require any privileges (PR:N) or user interaction (UI:N), and has a high impact on confidentiality, integrity, and availability (C:H/I:H/A:H).
2. Potential Attack Vectors and Exploitation Methods
Attack Vectors:
- Remote Code Execution (RCE): An attacker can send a specially crafted request to the join endpoint with a malicious
trust_remote_codeparameter, leading to arbitrary code execution. - Unauthenticated Exploitation: The vulnerability does not require authentication, making it easier for attackers to exploit.
Exploitation Methods:
- Crafted HTTP Requests: Attackers can send HTTP requests to the join endpoint with a payload that includes malicious code.
- Automated Scripts: Attackers can use automated scripts to scan for vulnerable installations and exploit them en masse.
3. Affected Systems and Software Versions
Affected Software:
- Product: oobabooga text-generation-webui
- Version: 2.5
Affected Systems:
- Any system running the vulnerable version of oobabooga text-generation-webui, including servers and cloud instances.
4. Recommended Mitigation Strategies
Immediate Mitigation:
- Patching: Apply the latest patch from the vendor. The fix is available in the commit
b5a6904c4ac4049823396090360b6f566f4e4603on GitHub. - Disable Remote Code Execution: Set the
trust_remote_codeparameter tofalseor remove it entirely until a patch is applied.
Long-Term Mitigation:
- Input Validation: Implement robust input validation and sanitization for all user-supplied parameters.
- Access Controls: Enforce strict access controls and authentication mechanisms to limit exposure.
- Regular Updates: Ensure that all software components are regularly updated and patched.
5. Impact on European Cybersecurity Landscape
The vulnerability poses a significant risk to organizations using the oobabooga text-generation-webui, particularly those in the European Union. The potential for unauthenticated RCE can lead to data breaches, service disruptions, and unauthorized access to sensitive information. This underscores the need for vigilant cybersecurity practices and timely patch management.
6. Technical Details for Security Professionals
Vulnerability Details:
- Parameter:
trust_remote_code - Endpoint: join
- Issue: Lack of proper validation of user-supplied arguments before loading a model.
Exploitation Steps:
- Identify Vulnerable Endpoint: Locate the join endpoint in the application.
- Craft Malicious Payload: Create a payload that includes malicious code to be executed.
- Send Request: Send an HTTP request to the join endpoint with the crafted payload.
Detection and Monitoring:
- Log Analysis: Monitor logs for unusual activity related to the join endpoint.
- Intrusion Detection Systems (IDS): Implement IDS to detect and alert on suspicious network traffic.
- Code Review: Conduct thorough code reviews to identify and mitigate similar vulnerabilities.
References:
By addressing this vulnerability promptly and implementing robust security measures, organizations can significantly reduce the risk of exploitation and protect their digital assets.