{"id":"CVE-2021-21408","aliases":["GHSA-4h9c-v5vg-5m6m"],"url":"https://o3.security/vulnerability/CVE-2021-21408","summary":"Access to restricted PHP code by dynamic static class access in smarty","details":"### Impact\nTemplate authors could run restricted static php methods.\n\n### Patches\nPlease upgrade to 3.1.40 or higher.\n\n### References\nSee the [documentation on Smarty security features](https://www.smarty.net/docs/en/advanced.features.tpl#advanced.features.security) on the static_classes access filter.\n\n### For more information\nIf you have any questions or comments about this advisory please open an issue in [the Smarty repo](https://github.com/smarty-php/smarty)\n","published":"2022-01-10T20:15:07.913Z","modified":"2026-07-08T06:29:19.903805614Z","cvss":{"score":8.8,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},"epss":{"score":0.0222,"percentile":0.81125,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"smarty/smarty","fixedVersion":"3.1.43"},{"ecosystem":"Packagist","name":"smarty/smarty","fixedVersion":"4.0.3"}],"fix":{"url":"https://github.com/smarty-php/smarty/commit/19ae410bf56007a5ef24441cdc6414619cfaf664","label":"smarty-php/smarty@19ae410"},"references":[{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/"},{"type":"ADVISORY","url":"https://github.com/smarty-php/smarty/releases/tag/v3.1.43"},{"type":"ADVISORY","url":"https://github.com/smarty-php/smarty/releases/tag/v4.0.3"},{"type":"ADVISORY","url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m"},{"type":"ADVISORY","url":"https://lists.debian.org/debian-lts-announce/2022/05/msg00005.html"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202209-09"},{"type":"ADVISORY","url":"https://www.debian.org/security/2022/dsa-5151"},{"type":"FIX","url":"https://github.com/smarty-php/smarty/commit/19ae410bf56007a5ef24441cdc6414619cfaf664"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21408"},{"type":"WEB","url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/smarty/smarty/CVE-2021-21408.yaml"},{"type":"PACKAGE","url":"https://github.com/smarty-php/smarty"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-08T06:29:19.903805614Z"}}