{"api_version":"1","generated_at":"2026-04-23T10:42:21+00:00","cve":"CVE-2021-21408","urls":{"html":"https://cve.report/CVE-2021-21408","api":"https://cve.report/api/cve/CVE-2021-21408.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-21408","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-21408"},"summary":{"title":"CVE-2021-21408","description":"Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.43 and 4.0.3, template authors could run restricted static php methods. Users should upgrade to version 3.1.43 or 4.0.3 to receive a patch.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-01-10 20:15:00","updated_at":"2023-11-07 03:30:00"},"problem_types":["CWE-20"],"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://lists.debian.org/debian-lts-announce/2022/05/msg00005.html","name":"[debian-lts-announce] 20220505 [SECURITY] [DLA 2995-1] smarty3 security update","refsource":"MLIST","tags":[],"title":"[SECURITY] [DLA 2995-1] smarty3 security update","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m","name":"https://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m","refsource":"CONFIRM","tags":[],"title":"Access to restricted PHP code by dynamic static class access · Advisory · smarty-php/smarty · GitHub","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/commit/19ae410bf56007a5ef24441cdc6414619cfaf664","name":"https://github.com/smarty-php/smarty/commit/19ae410bf56007a5ef24441cdc6414619cfaf664","refsource":"MISC","tags":[],"title":"Merge pull request from GHSA-4h9c-v5vg-5m6m · smarty-php/smarty@19ae410 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/smarty-php/smarty/releases/tag/v3.1.43","name":"https://github.com/smarty-php/smarty/releases/tag/v3.1.43","refsource":"MISC","tags":[],"title":"Release v3.1.43 · smarty-php/smarty · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.0.3","name":"https://github.com/smarty-php/smarty/releases/tag/v4.0.3","refsource":"MISC","tags":[],"title":"Release v4.0.3 · smarty-php/smarty · 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://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-2021-21408","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21408","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"21408","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":"2021","cve_id":"21408","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":"2021","cve_id":"21408","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":"2021","cve_id":"21408","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":"2021","cve_id":"21408","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":"2021","cve_id":"21408","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-2021-21408","qid":"179265","title":"Debian Security Update for smarty3 (DLA 2995-1)"},{"cve":"CVE-2021-21408","qid":"179330","title":"Debian Security Update for smarty3 (DSA 5151-1)"},{"cve":"CVE-2021-21408","qid":"184395","title":"Debian Security Update for smarty3smarty4 (CVE-2021-21408)"},{"cve":"CVE-2021-21408","qid":"198715","title":"Ubuntu Security Notification for Smarty Vulnerabilities (USN-5348-1)"},{"cve":"CVE-2021-21408","qid":"283228","title":"Fedora Security Update for Hypertext Preprocessor (PHP) (FEDORA-2022-52154efd61)"},{"cve":"CVE-2021-21408","qid":"283474","title":"Fedora Security Update for Hypertext Preprocessor (PHP) (FEDORA-2022-d5fc9dcdd7)"},{"cve":"CVE-2021-21408","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-2021-21408","STATE":"PUBLIC","TITLE":"Access to restricted PHP code by dynamic static class access in smarty"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"smarty","version":{"version_data":[{"version_value":"< 3.1.43"},{"version_value":">= 4.0.0, < 4.0.3"}]}}]},"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.43 and 4.0.3, template authors could run restricted static php methods. Users should upgrade to version 3.1.43 or 4.0.3 to receive a patch."}]},"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-20: Improper Input Validation"}]}]},"references":{"reference_data":[{"name":"https://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m","refsource":"CONFIRM","url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m"},{"name":"https://github.com/smarty-php/smarty/commit/19ae410bf56007a5ef24441cdc6414619cfaf664","refsource":"MISC","url":"https://github.com/smarty-php/smarty/commit/19ae410bf56007a5ef24441cdc6414619cfaf664"},{"name":"https://github.com/smarty-php/smarty/releases/tag/v3.1.43","refsource":"MISC","url":"https://github.com/smarty-php/smarty/releases/tag/v3.1.43"},{"name":"https://github.com/smarty-php/smarty/releases/tag/v4.0.3","refsource":"MISC","url":"https://github.com/smarty-php/smarty/releases/tag/v4.0.3"},{"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-4h9c-v5vg-5m6m","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-01-10 20:15:00","lastModifiedDate":"2023-11-07 03:30:00","problem_types":["CWE-20"],"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.0.3","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:*","versionEndExcluding":"3.1.43","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":{"CveYear":"2021","CveId":"21408","Ordinal":"195534","Title":"CVE-2021-21408","CVE":"CVE-2021-21408","Year":"2021"},"notes":[{"CveYear":"2021","CveId":"21408","Ordinal":"1","NoteData":"Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.43 and 4.0.3, template authors could run restricted static php methods. Users should upgrade to version 3.1.43 or 4.0.3 to receive a patch.","Type":"Description","Title":null},{"CveYear":"2021","CveId":"21408","Ordinal":"2","NoteData":"2022-01-10","Type":"Other","Title":"Published"},{"CveYear":"2021","CveId":"21408","Ordinal":"3","NoteData":"2022-01-10","Type":"Other","Title":"Modified"}]}}}