CVE-2026-53964: Document merge service Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-w47q-945m-q9pc
CVSS 7.2
CWE-1336
Published
Advisory Summary

CVE-2026-53964 is a HIGH (CVSS 7.2) remote code execution vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Document merge service libraries in the PyPI ecosystem. The issue involves document merge service vulnerable to rce via ssti (xlsx tempaltes). Remediation is available by upgrading affected packages to version 9.1.0.

CVE-2026-53964 at a Glance

CVE Identifier CVE-2026-53964
GHSA Identifier GHSA-w47q-945m-q9pc
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
Affected Product Document merge service
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-53964

To remediate this vulnerability, upgrade all affected Document merge service dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

document-merge-service fixed: 9.1.0
pip install document-merge-service>=9.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show document-merge-service

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-53964, inspect your installed packages using pip:

pip show document-merge-service

Analyze the terminal output to locate any version of Document merge service in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.1.0), your application is affected.

Note: The pip show document-merge-service command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. In Document merge service, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/adfinis/document-merge-service/releases/tag/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

CVE-2026-53964 Affected Document merge service Versions

1 component(s)
Fixed Versions:
9.1.0
Product / Package Ecosystem Affected Versions Fixed Version
document-merge-service
PyPI
< 9.1.0
9.1.0

References

Frequently Asked Questions

What is CVE-2026-53964?
CVE-2026-53964 is a security vulnerability in Document merge service involving Document Merge Service vulnerable to RCE via SSTI (xlsx tempaltes) under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine.
Which Document merge service versions are affected?
Affected versions include releases prior to 9.1.0 across affected packages: document-merge-service.
What version fixes CVE-2026-53964?
Upgrading to 9.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is document-merge-service affected?
Yes, document-merge-service is affected in releases prior to 9.1.0. Upgrade your dependency to 9.1.0 or later.
What is the CVSS score of CVE-2026-53964?
CVE-2026-53964 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-53964?
CVE-2026-53964 is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine (The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.).
How can I check PyPI dependencies for CVE-2026-53964?
Run the dependency tree command: 'pip show document-merge-service'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w47q-945m-q9pc",
  "modified" : "2026-08-19T19:17:19Z",
  "published" : "2026-08-19T19:17:19Z",
  "aliases" : [ "CVE-2026-53964" ],
  "summary" : "Document Merge Service vulnerable to RCE via SSTI (xlsx tempaltes)",
  "details" : "### Impact\nA 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. \n\n### Patches\nIt has been patched in [v9.1.0](https://github.com/adfinis/document-merge-service/releases/tag/v9.1.0)\n\n### Workarounds\nDisable the upload/usage of XLSX templates.\n\n### References\nAre there any links users can visit to find out more?\n\nhttps://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injection/jinja2-ssti",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "document-merge-service"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/adfinis/document-merge-service/security/advisories/GHSA-w47q-945m-q9pc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/adfinis/document-merge-service"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/adfinis/document-merge-service/releases/tag/v9.1.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1336" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-19T19:17:19Z",
    "nvd_published_at" : null
  }
}