Twig PHP less than 2.4.4 template engine - SSTI

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.

Anandhu K A
Written by
Lead Engineer

With a profound understanding of product development, Anandhu plays a pivotal role in crafting cutting-edge solutions that cater to the evolving security needs of digital applications. His expertise, deeply rooted in both engineering and security, makes him an essential component of Beagle Security's mission

Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 14 days
4.8 on G2 • ISO 27001 certified
See How Beagle Security Works
No credit card • No setup required
Launch interactive demo