CVE-2026-31020
Received Received - Intake

Server-Side Template Injection in DocsGPT

Vulnerability report for CVE-2026-31020, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-04

Last updated on: 2026-09-04

Assigner: MITRE

Description

In DocsGPT 0.15.0 and below, the application provides a custom prompt feature that allows users to define prompt content used during chatbot interactions. This functionality renders user-supplied prompt data using Jinja templates without input sanitization or sandboxing. An unauthenticated attacker can inject malicious template expressions, leading to a server-side template injection (SSTI) vulnerability that can be exploited to achieve full remote code execution (RCE).

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-04
Last Modified
2026-09-04
Generated
2026-09-05
AI Q&A
2026-09-04
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a server-side template injection (SSTI) vulnerability in DocsGPT 0.15.0 and below. It allows unauthenticated attackers to inject malicious template expressions via a custom prompt feature. The lack of input sanitization or sandboxing enables these expressions to be rendered using Jinja templates, potentially leading to remote code execution (RCE).

Detection Guidance

Detecting this SSTI vulnerability requires checking for untrusted Jinja template usage in DocsGPT 0.15.0 or below. Inspect application logs for unusual template expressions or errors. Test with crafted payloads like {{7*7}} in prompts to see if it evaluates to 49. Check if the application allows unauthenticated prompt submissions.

Impact Analysis

An attacker could exploit this to execute arbitrary code on the server, potentially gaining full control over the system. This could lead to data theft, unauthorized access, or disruption of services. The high CVSS score (9.8) indicates severe impact.

Compliance Impact

This vulnerability could lead to unauthorized data access or exfiltration, violating GDPR's data protection requirements and HIPAA's safeguards for protected health information. Non-compliance risks include legal penalties, fines, and reputational damage.

Mitigation Strategies

Upgrade DocsGPT to a version above 0.15.0 that includes input sanitization. If upgrading is not possible, disable the custom prompt feature entirely. Implement strict input validation for all user-supplied prompts. Restrict network access to the application to trusted sources only.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-31020. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart