CVE-2024-37301:
document-merge-service vulnerable to Remote Code Execution via Server-Side Template Injection
9.1
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
6/11/2024
Updated
10/16/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
document-merge-service | pip | < 6.5.2 | 6.5.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from using jinja2.Environment instead of SandboxedEnvironment. The commit diff shows the patching involved switching to SandboxedEnvironment, which restricts access to unsafe operations. The original Environment implementation allowed template authors to traverse object hierarchies (via class, mro, subclasses) to reach dangerous functions, as demonstrated in the POC using subprocess.Popen for RCE.