{"id":"CVE-2021-26120","aliases":["GHSA-3rpf-5rqv-689q"],"url":"https://o3.security/vulnerability/CVE-2021-26120","summary":"PHP Code Injection by malicious function name in smarty","details":"Template authors could inject php code by choosing a malicous {function} name. Sites that cannot fully trust template authors should update as soon as possible. Please upgrade to 3.1.39 or higher.\n","published":"2021-02-22T02:15:14.323Z","modified":"2026-07-08T05:59:37.637113913Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"Packagist","name":"smarty/smarty","fixedVersion":"3.1.39"}],"fix":{"url":"https://github.com/smarty-php/smarty/commit/165f1bd4d2eec328cfeaca517a725b46001de838","label":"smarty-php/smarty@165f1bd"},"references":[{"type":"ADVISORY","url":"https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md"},{"type":"ADVISORY","url":"https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html"},{"type":"ADVISORY","url":"https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html"},{"type":"ADVISORY","url":"https://www.debian.org/security/2022/dsa-5151"},{"type":"FIX","url":"https://security.gentoo.org/glsa/202105-06"},{"type":"WEB","url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-3rpf-5rqv-689q"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-26120"},{"type":"WEB","url":"https://github.com/smarty-php/smarty/commit/165f1bd4d2eec328cfeaca517a725b46001de838"},{"type":"WEB","url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/smarty/smarty/CVE-2021-26120.yaml"},{"type":"PACKAGE","url":"https://github.com/smarty-php/smarty"},{"type":"WEB","url":"https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md#3139---2021-02-17"},{"type":"WEB","url":"https://srcincite.io/blog/2021/02/18/smarty-template-engine-multiple-sandbox-escape-vulnerabilities.html"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-08T05:59:37.637113913Z"}}