{"id":"CVE-2022-29221","state":"PUBLISHED","title":"PHP Code Injection by malicious block or filename in Smarty","description":"Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.45 and 4.1.1, template authors could inject php code by choosing a malicious {block} name or {include} file name. Sites that cannot fully trust template authors should upgrade to versions 3.1.45 or 4.1.1 to receive a patch for this issue. There are currently no known workarounds.","publishedAt":"2022-05-24T00:00:00.000Z","updatedAt":"2025-04-23T18:22:54.999Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["smarty-php smarty"],"affected":[{"vendor":"smarty-php","product":"smarty","versions":[{"version":"< 3.1.45","status":"affected"},{"version":">= 4.0.0, < 4.1.1","status":"affected"}]}],"references":["https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c","https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd","https://github.com/smarty-php/smarty/releases/tag/v3.1.45","https://github.com/smarty-php/smarty/releases/tag/v4.1.1","https://lists.debian.org/debian-lts-announce/2022/05/msg00044.html","https://www.debian.org/security/2022/dsa-5151","https://security.gentoo.org/glsa/202209-09","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/"],"weaknesses":["CWE-94"],"ingestedAt":"2026-10-29T19:49:57.813Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/29xxx/CVE-2022-29221.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2022-29221","state":"PUBLISHED","datePublished":"2022-05-24T00:00:00.000Z","dateUpdated":"2025-04-23T18:22:54.999Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2022-04-13T00:00:00.000Z"},"containers":{"cna":{"title":"PHP Code Injection by malicious block or filename in Smarty","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.45 and 4.1.1, template authors could inject php code by choosing a malicious {block} name or {include} file name. Sites that cannot fully trust template authors should upgrade to versions 3.1.45 or 4.1.1 to receive a patch for this issue. There are currently no known workarounds."}],"affected":[{"vendor":"smarty-php","product":"smarty","versions":[{"version":"< 3.1.45","status":"affected"},{"version":">= 4.0.0, < 4.1.1","status":"affected"}]}],"references":[{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c"},{"url":"https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd"},{"url":"https://github.com/smarty-php/smarty/releases/tag/v3.1.45"},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.1.1"},{"url":"https://lists.debian.org/debian-lts-announce/2022/05/msg00044.html","name":"[debian-lts-announce] 20220529 [SECURITY] [DLA 3033-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"]}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":8.8,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","type":"CWE","lang":"en","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2022-11-14T00:00:00.000Z"},"source":{"advisory":"GHSA-634x-pc3q-cf4c","discovery":"UNKNOWN"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c","tags":["x_transferred"]},{"url":"https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd","tags":["x_transferred"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v3.1.45","tags":["x_transferred"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.1.1","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/05/msg00044.html","name":"[debian-lts-announce] 20220529 [SECURITY] [DLA 3033-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":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T06:17:54.199Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-04-23T15:52:58.668263Z","id":"CVE-2022-29221","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-04-23T18:22:54.999Z"}}]}}}