CVE-2026-31020
9.8DocsGPT · DocsGPT
DocsGPT 0.15.0 and earlier contains a server-side template injection vulnerability in the custom prompt feature, allowing unauthenticated attackers to achieve remote code execution.
Executive summary
A critical server-side template injection vulnerability in DocsGPT allows unauthenticated remote code execution, posing an extreme risk to system integrity and confidentiality.
Vulnerability
The application fails to sanitize or sandbox user-supplied prompt data rendered via Jinja templates. This allows an unauthenticated attacker to inject malicious template expressions into the custom prompt feature to execute arbitrary code on the underlying server.
Business impact
The vulnerability carries a CVSS score of 9.8, reflecting its critical nature and the ease of exploitation. Successful exploitation grants an attacker full control over the host server, which can lead to complete data exfiltration, unauthorized administrative access, and persistent system compromise. Such a breach could result in severe reputational damage and significant operational disruption for any organization deploying this software.
Remediation
Immediate Action: Restrict access to the affected chatbot interface until a vendor patch is released and applied. If the feature is not strictly necessary for operations, disable the custom prompt functionality entirely.
Proactive Monitoring: Review web server and application logs for suspicious inbound HTTP requests containing Jinja2 syntax or unusual code execution patterns. Monitor system process logs for unauthorized child processes spawned by the web application service.
Compensating Controls: Deploy a Web Application Firewall (WAF) with rules configured to detect and block common template injection payloads and anomalous characters in input fields. Ensure the application service runs with the least privilege necessary to limit potential lateral movement.
Exploitation status
Public Exploit Available: Yes, a published proof-of-concept exists, as attributed to the research documentation hosted at the GitHub repository linked in the CVE references.
Analyst recommendation
Given the critical severity of this remote code execution flaw and the lack of a current vendor patch, immediate defensive measures are required. Organizations must treat this vulnerability with the highest level of urgency by restricting public access to the vulnerable interface or applying strict input filtering at the network edge until an official update is available.