The document discusses server-side template injection, where malicious code can be injected through templates used to generate web pages or emails. Templates are widely used by web applications to dynamically generate data. The first step in detecting a server-side template injection is noticing unusual behavior, errors, or mathematical expressions being executed on the server. Ways to detect injections include inserting mathematical expressions into templates. Mitigations include executing users' code in sandboxed environments like Docker containers and validating user input.
Template Engines are:
1.Widely used by web applications for dynamically generating data.
2. These data are generated through web pages or emails.
4.
What is ServerSide Template Injection??
1. We are able to inject some malicious piece of code through the improper/unsafe embedded input
into the templates used
2. This may result into the execution of commands at the server side
Mitigations
1. Executing users’code in a sandboxed environment to lower the risk
2. Sandboxing inside a locked down Docker container
3. Validation of input field is always one way to avoid any malicious user to enter any unethical code