{
    "CVE_data_meta": {
        "ASSIGNER": "security-advisories@github.com",
        "ID": "CVE-2021-29454",
        "STATE": "PUBLIC",
        "TITLE": "Sandbox Escape by math function in smarty"
    },
    "affects": {
        "vendor": {
            "vendor_data": [
                {
                    "product": {
                        "product_data": [
                            {
                                "product_name": "smarty",
                                "version": {
                                    "version_data": [
                                        {
                                            "version_value": "< 3.1.42"
                                        },
                                        {
                                            "version_value": ">= 4.0.0, < 4.0.2"
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "vendor_name": "smarty-php"
                }
            ]
        }
    },
    "data_format": "MITRE",
    "data_type": "CVE",
    "data_version": "4.0",
    "description": {
        "description_data": [
            {
                "lang": "eng",
                "value": "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."
            }
        ]
    },
    "impact": {
        "cvss": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 8.1,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
            "version": "3.1"
        }
    },
    "problemtype": {
        "problemtype_data": [
            {
                "description": [
                    {
                        "lang": "eng",
                        "value": "CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')"
                    }
                ]
            }
        ]
    },
    "references": {
        "reference_data": [
            {
                "name": "https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m",
                "refsource": "CONFIRM",
                "url": "https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m"
            },
            {
                "name": "https://github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71",
                "refsource": "MISC",
                "url": "https://github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71"
            },
            {
                "name": "https://github.com/smarty-php/smarty/releases/tag/v3.1.42",
                "refsource": "MISC",
                "url": "https://github.com/smarty-php/smarty/releases/tag/v3.1.42"
            },
            {
                "name": "https://github.com/smarty-php/smarty/releases/tag/v4.0.2",
                "refsource": "MISC",
                "url": "https://github.com/smarty-php/smarty/releases/tag/v4.0.2"
            },
            {
                "name": "https://packagist.org/packages/smarty/smarty",
                "refsource": "MISC",
                "url": "https://packagist.org/packages/smarty/smarty"
            },
            {
                "name": "https://www.smarty.net/docs/en/language.function.math.tpl",
                "refsource": "MISC",
                "url": "https://www.smarty.net/docs/en/language.function.math.tpl"
            },
            {
                "refsource": "MLIST",
                "name": "[debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update",
                "url": "https://lists.debian.org/debian-lts-announce/2022/05/msg00005.html"
            },
            {
                "refsource": "DEBIAN",
                "name": "DSA-5151",
                "url": "https://www.debian.org/security/2022/dsa-5151"
            },
            {
                "refsource": "GENTOO",
                "name": "GLSA-202209-09",
                "url": "https://security.gentoo.org/glsa/202209-09"
            },
            {
                "refsource": "FEDORA",
                "name": "FEDORA-2022-52154efd61",
                "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/"
            },
            {
                "refsource": "FEDORA",
                "name": "FEDORA-2022-d5fc9dcdd7",
                "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/"
            }
        ]
    },
    "source": {
        "advisory": "GHSA-29gp-2c3m-3j6m",
        "discovery": "UNKNOWN"
    }
}