All reports
High

Sandbox Escape by math function in smarty

Affected versions

Version ranges need review.

Affected versions
<3.1.42|>=4.0.0,<4.0.2
Fixed version
Not reported
Affected versions
>= 4.0.0, < 4.0.2
Fixed version
4.0.2
Affected versions
< 3.1.42
Fixed version
3.1.42

Exploitation

CVE-2021-29454

Probability of exploitation in the next 30 days: 1.86%

FIRST EPSS · 2026-11-24

Description

Impact

Template authors could run arbitrary PHP code by crafting a malicious math string. If a math string is passed through as user provided data to the math function, external users could run arbitrary PHP code by crafting a malicious math string.

Patches

Please upgrade to 4.0.2 or 3.1.42 or higher.

References

See documentation on Math function.

For more information

If you have any questions or comments about this advisory please open an issue in the Smarty repo

Links