vendor:
Jinja2
by:
JameelNabbo
9.8
CVSS
CRITICAL
Command Injection
78
CWE
Product Name: Jinja2
Affected Version From: 2.1
Affected Version To: 2.1
Patch Exists: NO
Related CWE: CVE-2019-8341
CPE: a:jinja:jinja2:2.10
Platforms Tested: Kali Linux
2019
Jinja2 Command injection from_string function
The from_string function in Jinja2 is prone to server-side template injection (SSTI) vulnerability. It takes the 'source' parameter as a template object, renders it, and returns it. This allows an attacker to inject arbitrary commands and execute them on the server.
Mitigation:
To prevent this vulnerability, never let the user provide template content. Instead, use predefined templates or sanitize user input before using it in the template.