{"schemaVersion":3,"id":"CVE-2022-29221","aliases":["MGASA-2022-0226","UBUNTU-CVE-2022-29221","USN-6012-1","DEBIAN-CVE-2022-29221","DLA-3033-1"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2022-05-24T00:00:00.000Z","modified":"2025-04-23T18:22:54.999Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","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","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","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","exploitability":7.2,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","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","exploitability":7.2,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","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","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":6.5,"severity":"medium","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.04914,"percentile":0.92029,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.04914},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.04914,"percentile":0.92029}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.04914,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.04914,"percentile":0.92029}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-94","name":"Improper Control of Generation of Code ('Code Injection')","description":"The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/94.html"}],"affected":[{"vendor":"debian","product":"smarty3","name":"smarty3","label":"smarty3","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/smarty3","purlType":"deb","versions":[{"text":"< 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u6","noFixRecorded":false,"fixedIn":null},{"text":"< 3.1.45-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u6 | < 3.1.45-1","eol":null,"hubHref":null},{"vendor":"debian","product":"smarty4","name":"smarty4","label":"smarty4","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/smarty4","purlType":"deb","versions":[{"text":"< 4.1.1-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.1.1-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"collabtive","name":"collabtive","label":"collabtive","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/collabtive","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"galette","name":"galette","label":"galette","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/galette","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"gosa","name":"gosa","label":"gosa","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/gosa","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"postfixadmin","name":"postfixadmin","label":"postfixadmin","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/postfixadmin","purlType":"deb","versions":[{"text":"< 3.0.2-2ubuntu0.1~esm1","noFixRecorded":false,"fixedIn":null},{"text":"< 3.2.1-3ubuntu0.1~esm1","noFixRecorded":false,"fixedIn":null},{"text":"< 3.3.10-2ubuntu0.1~esm1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.0.2-2ubuntu0.1~esm1 | < 3.2.1-3ubuntu0.1~esm1 | < 3.3.10-2ubuntu0.1~esm1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"smarty3","name":"smarty3","label":"smarty3","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/smarty3","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 3.1.39-2ubuntu1.22.04.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 3.1.39-2ubuntu1.22.04.1","eol":null,"hubHref":null},{"vendor":"debian","product":"debian_linux","name":"debian linux","label":"debian_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"9.0","noFixRecorded":false,"fixedIn":null},{"text":"10.0","noFixRecorded":false,"fixedIn":null},{"text":"11.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"9.0 | 10.0 | 11.0","eol":{"isEol":true,"eolDate":"2022-07-01T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"9","label":"9 (Stretch)","eolFrom":"2022-07-01T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"9.13"},"product":{"name":"debian","label":"Debian","category":"os"}},"hubHref":"/vendor/debian/debian_linux"},{"vendor":"fedoraproject","product":"fedora","name":"fedora","label":"fedora","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"36","noFixRecorded":false,"fixedIn":null},{"text":"37","noFixRecorded":false,"fixedIn":null}],"versionsText":"36 | 37","eol":{"isEol":true,"eolDate":"2023-05-16T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"36","label":"36","eolFrom":"2023-05-16T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":null},"product":{"name":"fedora","label":"Fedora Linux","category":"os"}},"hubHref":"/vendor/fedoraproject/fedora"},{"vendor":"mageia","product":"php-smarty","name":"php-smarty","label":"php-smarty","ecosystem":"Mageia","cpePart":null,"purl":"pkg:rpm/mageia/php-smarty","purlType":"rpm","versions":[{"text":"< 4.1.1-1.mga8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.1.1-1.mga8","eol":null,"hubHref":null},{"vendor":"smarty-php","product":"smarty","name":"smarty","label":"smarty","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.1.45","noFixRecorded":false,"fixedIn":null},{"text":"≥ 4.0.0, < 4.1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.1.45 | ≥ 4.0.0, < 4.1.1","eol":null,"hubHref":"/vendor/smarty-php/smarty"},{"vendor":"smarty","product":"smarty","name":"smarty","label":"smarty","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.1.45","noFixRecorded":false,"fixedIn":null},{"text":"≥ 4.0.0, < 4.1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.1.45 | ≥ 4.0.0, < 4.1.1","eol":null,"hubHref":"/vendor/smarty/smarty"}],"affectedCount":12,"eol":{"hasEol":true,"count":2},"references":[{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c","label":"github.com/smarty-php/smarty/security/advisories/GHSA-634x-pc3q-cf4c","hostname":"github.com","tags":["Advisory","REPORT","Third Party Advisory"]},{"url":"https://github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd","label":"github.com/smarty-php/smarty/commit/64ad6442ca1da31cefdab5c9874262b702cccddd","hostname":"github.com","tags":["REPORT","Patch","Third Party Advisory"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v3.1.45","label":"github.com/smarty-php/smarty/releases/tag/v3.1.45","hostname":"github.com","tags":["REPORT","Release Notes","Third Party Advisory"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.1.1","label":"github.com/smarty-php/smarty/releases/tag/v4.1.1","hostname":"github.com","tags":["WEB","REPORT","Release Notes","Third Party Advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/05/msg00044.html","label":"lists.debian.org/debian-lts-announce/2022/05/msg00044.html","hostname":"lists.debian.org","tags":["Mailing List","Third Party Advisory"]},{"url":"https://www.debian.org/security/2022/dsa-5151","label":"www.debian.org/security/2022/dsa-5151","hostname":"www.debian.org","tags":["Vendor Advisory","WEB","Third Party Advisory"]},{"url":"https://security.gentoo.org/glsa/202209-09","label":"security.gentoo.org/glsa/202209-09","hostname":"security.gentoo.org","tags":["Vendor Advisory","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory"]},{"url":"https://advisories.mageia.org/MGASA-2022-0226.html","label":"advisories.mageia.org/MGASA-2022-0226.html","hostname":"advisories.mageia.org","tags":["Advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=30495","label":"bugs.mageia.org/show_bug.cgi?id=30495","hostname":"bugs.mageia.org","tags":["REPORT"]},{"url":"https://ubuntu.com/security/CVE-2022-29221","label":"ubuntu.com/security/CVE-2022-29221","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://github.com/smarty-php/smarty/commit/3606c4717ed6348e114a610ff1e446048dcd0345","label":"github.com/smarty-php/smarty/commit/3606c4717ed6348e114a610ff1e446048dcd0345","hostname":"github.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-6012-1","label":"ubuntu.com/security/notices/USN-6012-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-6550-1","label":"ubuntu.com/security/notices/USN-6550-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-29221","label":"www.cve.org/CVERecord?id=CVE-2022-29221","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-29221","label":"security-tracker.debian.org/tracker/CVE-2022-29221","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["DSA-5151-1","USN-6550-1"],"duplicates":[],"related":["USN-6550-1"]},"timeline":[{"kind":"published","date":"2022-05-24T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-23T18:22:54.999Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":36,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T21:51:15.615Z","stale":false,"partial":false}}