SSI INJECTION
Server-Side Includes (SSI) is a technology web applications use to create dynamic content on HTML pages. The use of SSI can often be inferred from the file extension .shtml, .shtm, and .stm. SSI utilizes directives to add dynamically generated content to a static HTML page. SSI injection occurs when an attacker can inject SSI directives into a file that is subsequently served by the web server, resulting in the execution of the injected SSI directives.
Example use cases:
when the web application contains a vulnerable file upload vulnerability that enables an attacker to upload a file containing malicious SSI directives into the web root directory.
attackers might be able to inject SSI directives if a web application writes user input to a file in the web root directory.
Directives
name
: the directive's nameparameter name
: one or more parametersvalue
: one or more parameter values
Syntax
Common Directives
MITIGATION
validate and sanitize user input
configure the webserver to restrict the use of SSI to particular file extensions and potentially even particular directories
turn off specific directives if its not actively required
Last updated