{"id":"CVE-2018-13982","published":"2018-09-18T21:00:00Z","modified":"2024-08-05T09:21:40Z","title":"Smarty_Security::isTrustedResourceDir() in Smarty before 3.1.33 is prone to a path traversal vulnerability due to…","vendor":null,"product":null,"tier":"tail","description":{"text":"Smarty_Security::isTrustedResourceDir() in Smarty before 3.1.33 is prone to a path traversal vulnerability due to insufficient template code sanitization. This allows attackers controlling the executed template code to bypass the trusted directory security restriction and read arbitrary files.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.03463,"percentile":0.89337,"provenance":"source"},"cwes":[],"references":[{"url":"https://github.com/smarty-php/smarty/commit/2e081a51b1effddb23f87952959139ac62654d50","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/smarty-php/smarty/commit/f9ca3c63d1250bb56b2bda609dcc9dd81f0065f8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/smarty-php/smarty/commit/c9dbe1d08c081912d02bd851d1d1b6388f6133d1","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/smarty-php/smarty/commit/8d21f38dc35c4cd6b31c2f23fc9b8e5adbc56dfe","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/smarty-php/smarty/commit/bcedfd6b58bed4a7366336979ebaa5a240581531","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sbaresearch/advisories/tree/public/2018/SBA-ADV-20180420-01_Smarty_Path_Traversal","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/10/msg00015.html","tags":["mailing-list","x_refsource_MLIST"]}],"priority":{"score":17.9,"factors":[{"name":"EPSS percentile","points":17.87}]},"affected":[{"ecosystem":"Packagist","package":"smarty/smarty","vulnerableRanges":["<3.1.33"],"patched":["3.1.33"],"from":["GHSA-7gfx-wxfh-7rvm"],"provenance":"source"}],"summary":{"text":"Smarty_Security::isTrustedResourceDir() in the Smarty template engine, before version 3.1.33, contains a path traversal flaw caused by insufficient sanitization of template code. An attacker who can control the template code being executed can bypass the trusted directory restriction and read arbitrary files on the system.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:26:53Z"},"euvd":{"id":"EUVD-2022-2995","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-smarty-php-smarty-cve-2018-16831","children":[{"from":"CVE-2018-13982","to":"CVE-2026-62992","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["libs/sysplugins/smarty_security.php"],"commits":["https://github.com/smarty-php/smarty/commit/2e081a51b1effddb23f87952959139ac62654d50","https://github.com/smarty-php/smarty/commit/f9ca3c63d1250bb56b2bda609dcc9dd81f0065f8","https://github.com/smarty-php/smarty/commit/99c048ce7a590c519b79fbd38ad0143a08183a1f","https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90"],"basis":"shared function","functions":["_updateResourceDir"]}]},{"from":"CVE-2018-13982","to":"CVE-2026-62993","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["libs/sysplugins/smarty_security.php"],"commits":["https://github.com/smarty-php/smarty/commit/2e081a51b1effddb23f87952959139ac62654d50","https://github.com/smarty-php/smarty/commit/f9ca3c63d1250bb56b2bda609dcc9dd81f0065f8","https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90"],"basis":"shared function","functions":["_updateResourceDir"]}]}],"packageHistory":[{"cve":"CVE-2012-4437","published":"2012-10-01","fixed":"3.1.12","kev":false},{"cve":"CVE-2014-8350","published":"2014-11-03","fixed":"3.1.21","kev":false},{"cve":"CVE-2017-1000480","published":"2018-01-03","fixed":"3.1.32","kev":false,"link":{"from":"CVE-2017-1000480","to":"CVE-2018-13982","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:smarty/smarty","fromFixed":"3.1.32","toFixed":"3.1.33","daysApart":258}]}},{"cve":"CVE-2018-13982","published":"2018-09-18","fixed":"3.1.33","kev":false},{"cve":"CVE-2018-16831","published":"2018-09-11","fixed":"3.1.33","kev":false},{"cve":"CVE-2021-26119","published":"2021-02-22","fixed":"3.1.39","kev":false},{"cve":"CVE-2021-26120","published":"2021-02-22","fixed":"3.1.39","kev":false}],"package":"Packagist:smarty/smarty"}}