{"api_version":"1","generated_at":"2026-04-23T07:00:30+00:00","cve":"CVE-2022-29221","urls":{"html":"https://cve.report/CVE-2022-29221","api":"https://cve.report/api/cve/CVE-2022-29221.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-29221","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-29221"},"summary":{"title":"CVE-2022-29221","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-05-24 15:15:00","updated_at":"2023-11-07 03:45:00"},"problem_types":["CWE-94"],"metrics":[],"references":[{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/","name":"FEDORA-2022-52154efd61","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 36 Update: php-Smarty-3.1.47-1.fc36 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c","name":"https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c","refsource":"CONFIRM","tags":[],"title":"PHP Code Injection by malicious block or filename · Advisory · smarty-php/smarty · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.debian.org/debian-lts-announce/2022/05/msg00044.html","name":"[debian-lts-announce] 20220529 [SECURITY] [DLA 3033-1] smarty3 security update","refsource":"MLIST","tags":[],"title":"[SECURITY] [DLA 3033-1] smarty3 security update","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/","name":"FEDORA-2022-d5fc9dcdd7","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 37 Update: php-Smarty-3.1.47-1.fc37 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.1.1","name":"https://github.com/smarty-php/smarty/releases/tag/v4.1.1","refsource":"MISC","tags":[],"title":"Release v4.1.1 · smarty-php/smarty · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd","name":"https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd","refsource":"MISC","tags":[],"title":"Merge branch 'security/blockfunctioninjection' · smarty-php/smarty@64ad644 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/","name":"FEDORA-2022-d5fc9dcdd7","refsource":"","tags":[],"title":"[SECURITY] Fedora 37 Update: php-Smarty-3.1.47-1.fc37 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://security.gentoo.org/glsa/202209-09","name":"GLSA-202209-09","refsource":"GENTOO","tags":[],"title":"Smarty: Multiple vulnerabilities (GLSA 202209-09) — Gentoo security","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/smarty-php/smarty/releases/tag/v3.1.45","name":"https://github.com/smarty-php/smarty/releases/tag/v3.1.45","refsource":"MISC","tags":[],"title":"Release v3.1.45 · smarty-php/smarty · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/","name":"FEDORA-2022-52154efd61","refsource":"","tags":[],"title":"[SECURITY] Fedora 36 Update: php-Smarty-3.1.47-1.fc36 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.debian.org/security/2022/dsa-5151","name":"DSA-5151","refsource":"DEBIAN","tags":[],"title":"Debian -- Security Information -- DSA-5151-1 smarty3","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-29221","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29221","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"29221","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"debian","cpe5":"debian_linux","cpe6":"10.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"29221","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"debian","cpe5":"debian_linux","cpe6":"11.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"29221","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"debian","cpe5":"debian_linux","cpe6":"9.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"29221","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"36","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"29221","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"37","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"29221","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"smarty","cpe5":"smarty","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-29221","qid":"179328","title":"Debian Security Update for smarty3 (DLA 3033-1)"},{"cve":"CVE-2022-29221","qid":"179330","title":"Debian Security Update for smarty3 (DSA 5151-1)"},{"cve":"CVE-2022-29221","qid":"182181","title":"Debian Security Update for smarty3smarty4 (CVE-2022-29221)"},{"cve":"CVE-2022-29221","qid":"199284","title":"Ubuntu Security Notification for Smarty Vulnerability (USN-6012-1)"},{"cve":"CVE-2022-29221","qid":"199998","title":"Ubuntu Security Notification for PostfixAdmin Vulnerabilities (USN-6550-1)"},{"cve":"CVE-2022-29221","qid":"283228","title":"Fedora Security Update for Hypertext Preprocessor (PHP) (FEDORA-2022-52154efd61)"},{"cve":"CVE-2022-29221","qid":"283474","title":"Fedora Security Update for Hypertext Preprocessor (PHP) (FEDORA-2022-d5fc9dcdd7)"},{"cve":"CVE-2022-29221","qid":"710622","title":"Gentoo Linux Smarty Multiple Vulnerabilities (GLSA 202209-09)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2022-29221","STATE":"PUBLIC","TITLE":"PHP Code Injection by malicious block or filename in Smarty"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"smarty","version":{"version_data":[{"version_value":"< 3.1.45"},{"version_value":">= 4.0.0, < 4.1.1"}]}}]},"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.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."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":8.8,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-94: Improper Control of Generation of Code ('Code Injection')"}]}]},"references":{"reference_data":[{"name":"https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c","refsource":"CONFIRM","url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c"},{"name":"https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd","refsource":"MISC","url":"https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd"},{"name":"https://github.com/smarty-php/smarty/releases/tag/v3.1.45","refsource":"MISC","url":"https://github.com/smarty-php/smarty/releases/tag/v3.1.45"},{"name":"https://github.com/smarty-php/smarty/releases/tag/v4.1.1","refsource":"MISC","url":"https://github.com/smarty-php/smarty/releases/tag/v4.1.1"},{"refsource":"MLIST","name":"[debian-lts-announce] 20220529 [SECURITY] [DLA 3033-1] smarty3 security update","url":"https://lists.debian.org/debian-lts-announce/2022/05/msg00044.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-634x-pc3q-cf4c","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-05-24 15:15:00","lastModifiedDate":"2023-11-07 03:45:00","problem_types":["CWE-94"],"metrics":{"baseMetricV3":{"cvssV3":{"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"},"exploitabilityScore":2.8,"impactScore":5.9},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:L/Au:S/C:P/I:P/A:P","accessVector":"NETWORK","accessComplexity":"LOW","authentication":"SINGLE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL","baseScore":6.5},"severity":"MEDIUM","exploitabilityScore":8,"impactScore":6.4,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0.0","versionEndExcluding":"4.1.1","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:*","versionEndExcluding":"3.1.45","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}