{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-26120","id":"CVE-2021-26120","title":"PHP Code Injection by malicious function name in smarty","description":"Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.","descriptionLong":"Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring.","published":"2021-02-22T01:38:15.000Z","updated":"2026-10-20T10:54:34.274355723Z","reserved":"2021-01-25T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","rating":"high","source":"NVD"}],"rating":"critical","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"status":"affected","version":"n/a"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"smarty/smarty","purl":"pkg:composer/smarty/smarty","ranges":["<3.1.39"],"fixed":["3.1.39"],"advisory":"GHSA-3rpf-5rqv-689q"}],"cwes":["CWE-94"],"aliases":["GHSA-3rpf-5rqv-689q"],"references":[{"url":"https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","advisory","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://security.gentoo.org/glsa/202105-06","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://www.debian.org/security/2022/dsa-5151","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-3rpf-5rqv-689q","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-26120","tags":["advisory"]},{"url":"https://github.com/smarty-php/smarty/commit/165f1bd4d2eec328cfeaca517a725b46001de838","tags":["web"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/smarty/smarty/CVE-2021-26120.yaml","tags":["web"]},{"url":"https://github.com/smarty-php/smarty","tags":["package"]},{"url":"https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md#3139---2021-02-17","tags":["web"]},{"url":"https://srcincite.io/blog/2021/02/18/smarty-template-engine-multiple-sandbox-escape-vulnerabilities.html","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.82316,"epssPercentile":0.99669,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-26120","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-26120","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-26120","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-3rpf-5rqv-689q","ok":true,"note":"GHSA-3rpf-5rqv-689q"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-26120","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":["EPSS 82% with CVSS 9.8"],"attention":null}