Description
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.
Modes of Introduction:
– Architecture and Design
Related Weaknesses
Consequences
Integrity: Execute Unauthorized Code or Commands
Potential Mitigations
Phase: Architecture and Design
Description:
Choose a template engine that offers a sandbox or restricted mode, or at least limits the power of any available expressions, function calls, or commands.
Phase: Implementation
Description:
Use the template engine’s sandbox or restricted mode, if available.
CVE References
- CVE-2017-16783
- server-side template injection in content management server
- CVE-2020-9437
- authentication / identity management product has client-side template injection
- CVE-2020-12790
- Server-Side Template Injection using a Twig template
- CVE-2021-21244
- devops platform allows SSTI
- CVE-2020-4027
- bypass of Server-Side Template Injection protection mechanism with macros in Velocity templates
- CVE-2020-26282
- web browser proxy server allows Java EL expressions from Server-Side Template Injection
- CVE-2020-1961
- SSTI involving mail templates and JEXL expressions
- CVE-2019-19999
- product does not use a “safe” setting for a FreeMarker configuration, allowing SSTI
- CVE-2018-20465
- product allows read of sensitive database username/password variables using server-side template injection
More Stories
The Most Dangerous Vulnerabilities in Apache Tomcat and How to Protect Against Them
Apache Tomcat is an open-source web server and servlet container that is widely used in enterprise environments to run Java...
ZDI-CAN-18333: A Critical Zero-Day Vulnerability in Microsoft Windows
Zero-day vulnerabilities are a serious threat to cybersecurity, as they can be exploited by malicious actors to gain unauthorized access...
CWE-669 – Incorrect Resource Transfer Between Spheres
Description The product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere,...
CWE-67 – Improper Handling of Windows Device Names
Description The software constructs pathnames from user input, but it does not handle or incorrectly handles a pathname containing a...
CWE-670 – Always-Incorrect Control Flow Implementation
Description The code contains a control flow path that does not reflect the algorithm that the path is intended to...
CWE-671 – Lack of Administrator Control over Security
Description The product uses security features in a way that prevents the product's administrator from tailoring security settings to reflect...