Twig PHP less than 2.4.4 template engine - SSTI

By
Anandhu K A
Published on
01 Oct 2021
Vulnerability

Twig is a modern PHP template engine that compiles templates down to plain optimised PHP code. Twig 2.4.4 has an SSTI vulnerability that allows attackers to execute commands within parameters. By just using "COMAND TO EXECUTE" instead of expected values “Normal integer or normal string,” depending on the vulnerable application, which uses GET or POST to pass different parameters.

Mitigation / Precaution

This issue was fixed in version 2.4.4. However, as this version is vulnerable to other flaws, we recommend that you switch to one of the secure versions.


Written by
Anandhu K A
Anandhu K A
Lead Engineer
Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 10 days