CVE-2025-0868 Scanner
CVE-2025-0868 Scanner - Unauthenticated Remote Code Execution vulnerability in DocsGPT
Short Info
Level
High
Single Scan
Single Scan
Can be used by
Asset Owner
Estimated Time
10 seconds
Time Interval
17 days 9 hours
Scan only one
Domain, Subdomain, IPv4
Toolbox
-
DocsGPT is an open-source tool that leverages GPT models to generate documentation and responses based on natural language input. It is designed to help developers and users automate documentation processes, making it easier to interact with complex data or code. DocsGPT is commonly used in development environments where there is a need to quickly create or update technical documents. Its user-friendly interface allows for easy interaction with GPT models to produce responses. The tool is highly customizable, integrating various APIs and services. DocsGPT provides a robust platform for streamlining document generation and reducing manual effort in content creation.
The vulnerability in DocsGPT arises due to improper parsing of JSON data using the eval() function. This flaw allows an unauthenticated attacker to inject arbitrary Python code through the /api/remote endpoint. The attacker can manipulate the data being processed by the application, leading to remote code execution. This issue affects DocsGPT versions from 0.8.1 to 0.12.0, and it is considered critical because it allows attackers to run arbitrary commands on the server without requiring authentication. The flaw is due to improper sanitization and validation of input before being processed by eval(), a dangerous function in Python when used improperly.
The vulnerability is triggered when an attacker sends a crafted POST request to the /api/remote endpoint, with malicious Python code embedded within the JSON data. The eval() function in the code parses this JSON data, executing the attacker’s payload. For example, the payload could be used to send a request to an external server, initiating a malicious action like data exfiltration or further exploitation of the system. The attacker does not need to be authenticated, making it easier to exploit this flaw remotely. This flaw exists because the app fails to sanitize the data being passed to eval(), allowing attackers to execute arbitrary code on the server side.
If exploited, this vulnerability allows an attacker to execute arbitrary Python code on the server, which could lead to complete compromise of the affected system. Attackers can gain full control of the server, exfiltrate sensitive data, install malware, or perform actions that disrupt the server’s operations. The lack of authentication requirements for exploitation makes this a high-risk vulnerability, especially if the service is publicly accessible. A successful attack could lead to a significant security breach, affecting both the server and any users interacting with the application. It is also possible for attackers to escalate their privileges or pivot to other systems within the network.
REFERENCES