CVE-2021-29454

Sandbox Escape by math function in smarty

Published Jan 10, 2022 CVSS 3.1 · 8.1 High EPSS 1.9% KEV · Not listed
Description
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.42 and 4.0.2, template authors could run arbitrary PHP code by crafting a malicious math string. If a math string was passed through as user provided data to the math function, external users could run arbitrary PHP code by crafting a malicious math string. Users should upgrade to version 3.1.42 or 4.0.2 to receive a patch.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2995-1 smarty3 security update
Debian DSA Debian DSA DSA-5151-1 smarty3 security update
EUVD EUVD EUVD-2022-0423 Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.42 and 4.0.2, template authors could run arbitrary PHP code by crafting a malicious math string. If a math string was passed through as user provided data to the math function, external users could run arbitrary PHP code by crafting a malicious math string. Users should upgrade to version 3.1.42 or 4.0.2 to receive a patch.
Github GHSA Github GHSA GHSA-29gp-2c3m-3j6m Sandbox Escape by math function in smarty
Ubuntu USN Ubuntu USN USN-5348-1 Smarty vulnerabilities
Ubuntu USN Ubuntu USN USN-5348-2 Smarty vulnerabilities
Ubuntu USN Ubuntu USN USN-5348-3 Smarty vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 23, 2025, 7:14 PM
Reserved
Mar 30, 2021, 12:00 AM
Status
Modified
Published
Jan 10, 2022, 8:15 PM
Modified
Jun 17, 2026, 3:47 AM