Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with high-privilege account
-
DeliveryUpload malicious XLSX template with SSTI payload
-
ExploitService processes template via non-sandboxed Jinja2
-
ExecutionPayload traverses Python object hierarchy
-
PersistExecute arbitrary OS commands as UID 901
-
ImpactContainer compromise
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Exploitation requires the attacker to hold high-privilege access sufficient to upload XLSX templates to the document-merge-service API (CVSS PR:H). The XLSX template feature must be enabled - disabling it fully eliminates the attack surface. The vulnerable code path is specifically triggered during XLSX template processing via the xltpl library; other template formats are not indicated as affected. Exploitation is limited by the container boundary (S:U) and runs as UID 901, not root. The limiting factors are: (1) authenticated high-privilege access required, (2) XLSX template functionality must be in use, (3) impact is scoped to the container runtime environment. |
| Impact | The CVSS 3.1 score of 7.2 (AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H) accurately reflects the high authentication requirement (PR:H), which is the primary risk limiter here. An attacker must hold high-privilege access - specifically the ability to upload XLSX templates - before exploitation is possible. This significantly narrows the realistic attacker population to insiders, compromised admin accounts, or users who have been granted template upload permissions. No EPSS data was provided, and KEV status is absent, meaning no confirmed active exploitation is known at time of analysis. That said, Jinja2 SSTI is a thoroughly documented and widely understood attack class, with public tooling and references (including HackTricks) cited in the advisory itself, so the technical barrier for a sufficiently privileged attacker is low. The impact within scope is severe (full container compromise, C:H/I:H/A:H), but scope change is not indicated (S:U), meaning blast radius is generally limited to the container. Even a small internal development team should treat this as urgent patching if XLSX template upload is enabled and multiple users have template-upload rights. |
| Exploit ScenarioDerived | An authenticated user with template-upload privileges submits a crafted XLSX file containing a Jinja2 SSTI payload (for example, referencing Python builtins via the class hierarchy) to the document-merge-service API. When the service processes the template using xltpl's non-sandboxed Jinja2 environment, the injected expression is evaluated, executing an OS command as UID 901 within the container. The attacker gains shell access or can exfiltrate data from the container's filesystem and environment variables. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 19, 2026
Remote code execution via server-side template injection (SSTI) in document-merge-service affects all versions before 9.1.0, exploitable by authenticated users with access to upload XLSX templates. The xltpl library processes XLSX templates through a non-sandboxed Jinja2 environment, allowing an attacker to embed Jinja2 expressions that execute arbitrary code server-side as the document-merge-server user (UID 901). No active exploitation (KEV) has been confirmed, but Jinja2 SSTI techniques are well-documented and HackTricks references are cited in the advisory, indicating the attack pattern is publicly known.
RemediationAI
The primary fix is to upgrade document-merge-service to v9.1.0 or later. The release replaces the upstream xltpl library with a forked version (commit df78a42) that addresses the non-sandboxed Jinja environment - see https://github.com/adfinis/document-merge-service/releases/tag/v9.1.0. If immediate upgrade is not possible, the vendor-recommended workaround is to disable the upload and usage of XLSX templates entirely. This eliminates the vulnerable code path at the cost of XLSX template functionality. Restricting template upload permissions to the minimum necessary set of trusted users is an additional compensating control that reduces the exploitable surface, though it does not eliminate the vulnerability for those with upload rights.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
document-merge-service (pkg:pip/document-merge-service) is a Django-based REST API for generating documents from templates. The vulnerable path is XLSX template processing via the xltpl library, which internally uses a Jinja2 templating environment that is not sandboxed. CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) describes this root cause: when user-controlled input reaches a template engine without sandboxing or escaping, template directives can be injected that the engine executes with the process's full privileges. In Jinja2, well-known SSTI payloads can traverse the Python object hierarchy to reach builtins such as __import__ and os.system, enabling arbitrary OS command execution. Execution occurs as UID 901 (document-merge-server) within the container environment.
Know when Ssti gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Network-reachable API with no user interaction, but PR:H because template upload requires high-privilege credentials; full C/I/A impact within container scope.
Primary rating from Vendor (https://github.com/adfinis/document-merge-service).
CVSS VectorVendor: https://github.com/adfinis/document-merge-service
DescriptionCVE.org
Impact
A remote code execution (RCE) via server-side template injection (SSTI) allows for user supplied code to be executed in the server's context where it is executed as the document-merge-server user with the UID 901 thus giving an attacker considerable control over the container. The vulnerability is limited to XLSX templates, were the xltpl library uses a npn-sandboxed Jinja environment for the processing of the template.
Patches
It has been patched in v9.1.0
Workarounds
Disable the upload/usage of XLSX templates.
References
Are there any links users can visit to find out more?
https://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injection/jinja2-ssti
Executive ViewAI
document-merge-service (versions before 9.1.0) is vulnerable to remote code execution through malicious XLSX template uploads by authenticated users. This affects organizations processing templates from internal users or partners and could enable attackers to gain server-level access. Risk is elevated in environments where template upload permissions are broadly distributed.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict XLSX template upload access to pre-approved personnel only with mandatory approval requirements; (2) Implement input validation to reject templates containing Jinja2 template syntax; (3) Run document-merge-service in a containerized environment with minimal filesystem and network access; (4) Deploy enhanced audit logging for all template upload and processing activities; (5) Establish process monitoring for suspicious activity under the document-merge-server UID (901); (6) Disable the service if not critical to business operations and consider alternative solutions.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. Rated c
Invision Community 5.0.0 through 5.0.6 contains an unauthenticated remote code execution vulnerability in the template e
Remote code execution in the WPML WordPress multilingual plugin (versions up to and including 4.6.12) allows Contributor
Server-side template injection in Adobe Commerce, Adobe Commerce B2B, and Magento Open Source allows remote unauthentica
Server-Side Template Injection in OpenCTI notifier templates allows privileged administrators with 'Manage customization
Unauthenticated remote code execution in Rejetto HFS2 (HTTP File Server) through version 2.4.0 lets an attacker execute
Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve
changedetection.io is an open source web page change detection, website watcher, restock monitor and notification servic
A server side template injection vulnerability in CrushFTP in all versions before 10.7.1 and 11.1.0 on all platforms all
Remote code execution in WGDashboard 4.3.2 and earlier lets authenticated attackers inject Server-Side Template Injectio
Gibbon through 26.0.00 allows /modules/School%20Admin/messengerSettings.php Server Side Template Injection leading to Re
Server-side template injection in the TYPO3 'Powermail' extension lets an anonymous user submit Fluid template syntax th
EUVD-2026-91047
GHSA-w47q-945m-q9pc
NVD
CVE.org
EPSS
Exploit-DB