CVE-2021-29454 (GCVE-0-2021-29454)

Vulnerability from cvelistv5 – Published: 2022-01-10 00:00 – Updated: 2025-04-23 19:14
VLAI?
Title
Sandbox Escape by math function in smarty
Summary
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.
CWE
  • CWE-74 - Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Assigner
Impacted products
Vendor Product Version
smarty-php smarty Affected: < 3.1.42
Affected: >= 4.0.0, < 4.0.2
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-03T22:02:51.996Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://github.com/smarty-php/smarty/releases/tag/v3.1.42"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://github.com/smarty-php/smarty/releases/tag/v4.0.2"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://packagist.org/packages/smarty/smarty"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://www.smarty.net/docs/en/language.function.math.tpl"
          },
          {
            "name": "[debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update",
            "tags": [
              "mailing-list",
              "x_transferred"
            ],
            "url": "https://lists.debian.org/debian-lts-announce/2022/05/msg00005.html"
          },
          {
            "name": "DSA-5151",
            "tags": [
              "vendor-advisory",
              "x_transferred"
            ],
            "url": "https://www.debian.org/security/2022/dsa-5151"
          },
          {
            "name": "GLSA-202209-09",
            "tags": [
              "vendor-advisory",
              "x_transferred"
            ],
            "url": "https://security.gentoo.org/glsa/202209-09"
          },
          {
            "name": "FEDORA-2022-52154efd61",
            "tags": [
              "vendor-advisory",
              "x_transferred"
            ],
            "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/"
          },
          {
            "name": "FEDORA-2022-d5fc9dcdd7",
            "tags": [
              "vendor-advisory",
              "x_transferred"
            ],
            "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-29454",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-04-23T15:57:13.410401Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-04-23T19:14:05.629Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "smarty",
          "vendor": "smarty-php",
          "versions": [
            {
              "status": "affected",
              "version": "\u003c 3.1.42"
            },
            {
              "status": "affected",
              "version": "\u003e= 4.0.0, \u003c 4.0.2"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "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."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "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"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-74",
              "description": "CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component (\u0027Injection\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2022-11-14T00:00:00.000Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "url": "https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m"
        },
        {
          "url": "https://github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71"
        },
        {
          "url": "https://github.com/smarty-php/smarty/releases/tag/v3.1.42"
        },
        {
          "url": "https://github.com/smarty-php/smarty/releases/tag/v4.0.2"
        },
        {
          "url": "https://packagist.org/packages/smarty/smarty"
        },
        {
          "url": "https://www.smarty.net/docs/en/language.function.math.tpl"
        },
        {
          "name": "[debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update",
          "tags": [
            "mailing-list"
          ],
          "url": "https://lists.debian.org/debian-lts-announce/2022/05/msg00005.html"
        },
        {
          "name": "DSA-5151",
          "tags": [
            "vendor-advisory"
          ],
          "url": "https://www.debian.org/security/2022/dsa-5151"
        },
        {
          "name": "GLSA-202209-09",
          "tags": [
            "vendor-advisory"
          ],
          "url": "https://security.gentoo.org/glsa/202209-09"
        },
        {
          "name": "FEDORA-2022-52154efd61",
          "tags": [
            "vendor-advisory"
          ],
          "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/"
        },
        {
          "name": "FEDORA-2022-d5fc9dcdd7",
          "tags": [
            "vendor-advisory"
          ],
          "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/"
        }
      ],
      "source": {
        "advisory": "GHSA-29gp-2c3m-3j6m",
        "discovery": "UNKNOWN"
      },
      "title": "Sandbox Escape by math function in smarty"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2021-29454",
    "datePublished": "2022-01-10T00:00:00.000Z",
    "dateReserved": "2021-03-30T00:00:00.000Z",
    "dateUpdated": "2025-04-23T19:14:05.629Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://github.com/smarty-php/smarty/releases/tag/v3.1.42\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://github.com/smarty-php/smarty/releases/tag/v4.0.2\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://packagist.org/packages/smarty/smarty\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://www.smarty.net/docs/en/language.function.math.tpl\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://lists.debian.org/debian-lts-announce/2022/05/msg00005.html\", \"name\": \"[debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update\", \"tags\": [\"mailing-list\", \"x_transferred\"]}, {\"url\": \"https://www.debian.org/security/2022/dsa-5151\", \"name\": \"DSA-5151\", \"tags\": [\"vendor-advisory\", \"x_transferred\"]}, {\"url\": \"https://security.gentoo.org/glsa/202209-09\", \"name\": \"GLSA-202209-09\", \"tags\": [\"vendor-advisory\", \"x_transferred\"]}, {\"url\": \"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/\", \"name\": \"FEDORA-2022-52154efd61\", \"tags\": [\"vendor-advisory\", \"x_transferred\"]}, {\"url\": \"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/\", \"name\": \"FEDORA-2022-d5fc9dcdd7\", \"tags\": [\"vendor-advisory\", \"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-03T22:02:51.996Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2021-29454\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2025-04-23T15:57:13.410401Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2025-04-23T15:57:15.621Z\"}}], \"cna\": {\"title\": \"Sandbox Escape by math function in smarty\", \"source\": {\"advisory\": \"GHSA-29gp-2c3m-3j6m\", \"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 8.1, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N\", \"integrityImpact\": \"HIGH\", \"userInteraction\": \"REQUIRED\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"NONE\", \"privilegesRequired\": \"NONE\", \"confidentialityImpact\": \"HIGH\"}}], \"affected\": [{\"vendor\": \"smarty-php\", \"product\": \"smarty\", \"versions\": [{\"status\": \"affected\", \"version\": \"\u003c 3.1.42\"}, {\"status\": \"affected\", \"version\": \"\u003e= 4.0.0, \u003c 4.0.2\"}]}], \"references\": [{\"url\": \"https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m\"}, {\"url\": \"https://github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71\"}, {\"url\": \"https://github.com/smarty-php/smarty/releases/tag/v3.1.42\"}, {\"url\": \"https://github.com/smarty-php/smarty/releases/tag/v4.0.2\"}, {\"url\": \"https://packagist.org/packages/smarty/smarty\"}, {\"url\": \"https://www.smarty.net/docs/en/language.function.math.tpl\"}, {\"url\": \"https://lists.debian.org/debian-lts-announce/2022/05/msg00005.html\", \"name\": \"[debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update\", \"tags\": [\"mailing-list\"]}, {\"url\": \"https://www.debian.org/security/2022/dsa-5151\", \"name\": \"DSA-5151\", \"tags\": [\"vendor-advisory\"]}, {\"url\": \"https://security.gentoo.org/glsa/202209-09\", \"name\": \"GLSA-202209-09\", \"tags\": [\"vendor-advisory\"]}, {\"url\": \"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/\", \"name\": \"FEDORA-2022-52154efd61\", \"tags\": [\"vendor-advisory\"]}, {\"url\": \"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/\", \"name\": \"FEDORA-2022-d5fc9dcdd7\", \"tags\": [\"vendor-advisory\"]}], \"descriptions\": [{\"lang\": \"en\", \"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.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-74\", \"description\": \"CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component (\u0027Injection\u0027)\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2022-11-14T00:00:00.000Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2021-29454\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-04-23T19:14:05.629Z\", \"dateReserved\": \"2021-03-30T00:00:00.000Z\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"datePublished\": \"2022-01-10T00:00:00.000Z\", \"assignerShortName\": \"GitHub_M\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…