Executive brief
DocsGPT is an open-source AI assistant application that allows users to define custom prompts for chatbot interactions. A vulnerability in versions 0.15.0 and below allows unauthenticated attackers to inject malicious code through the custom prompt feature, leading to complete remote code execution on the server. This could result in full system compromise, data theft, and lateral movement into connected networks.
Technical details
The vulnerability is a server-side template injection (SSTI) in DocsGPT's custom prompt functionality. The application renders user-supplied prompt data using Jinja templates without input sanitization or sandboxing. An unauthenticated attacker can inject malicious Jinja template expressions into the prompt content to break out of the template context and execute arbitrary Python code. The attack requires no authentication and is accessible over the network via the custom prompt feature. Successful exploitation grants full remote code execution in the context of the DocsGPT application process, potentially compromising the entire host system. A patch is expected to be available in a version above 0.15.0.
Affected products
- Arc53 DocsGPT 0.15.0 and below
Timeline
- 2026-03-26: disclosed: Vulnerability reported to vendor
- 2026-04-07: other: CVE-2026-31020 assigned
- 2026-09-04: advisory: Published to NVD