# CVE-2026-31020: DocsGPT server-side template injection in custom prompts

Source: https://junglewise.ai/threats/cve-2026-31020-docsgpt-server-side-template-injection-in-custom-prompts  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-04. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-31020 · Severity: critical · CVSS 9.8 · Published 2026-09-04

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.

Technologies: [Arc53 DocsGPT](https://junglewise.ai/threats/technologies/docsgpt). Vendors: [Arc53](https://junglewise.ai/threats/vendors/arc53).

## Quick answers

**Is CVE-2026-31020 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-31020 being exploited in the wild.

**How severe is CVE-2026-31020?** Critical severity, with a CVSS score of 9.8, published 4 September 2026.

**Which products and versions are affected?** Arc53 DocsGPT 0.15.0 and below.

**Is there a fix for CVE-2026-31020?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-31020 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-31020?** Check whether you run Arc53 DocsGPT at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## 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

## References

- [http://arc53.com/](http://arc53.com/)
- [https://github.com/PhDg1410/CVE/tree/main/CVE-2026-31020](https://github.com/PhDg1410/CVE/tree/main/CVE-2026-31020)

## Related threats

- [DocsGPT OAuth token exposure in callback-status endpoint](https://junglewise.ai/threats/cve-2026-91201-docsgpt-oauth-token-exposure-in-callback-status-endpoint)
- [arc53 DocsGPT insufficient data authenticity in credential storage](https://junglewise.ai/threats/cve-2026-13483-arc53-docsgpt-insufficient-data-authenticity-in-credential)
- [DocsGPT is a GPT-powered chat for documentation. From version 0.15.0 to before version 0.16.0, an attacker accessing…](https://junglewise.ai/threats/cve-2026-26015-docsgpt-is-a-gpt-powered-chat-for-documentation-from-version-0-15)
- [DocsGPT remote code execution via eval in JSON parsing](https://junglewise.ai/threats/cve-2025-0868-docsgpt-remote-code-execution-via-eval-in-json-parsing)
