{"id":"CVE-2018-16831","published":"2018-09-11T13:00:00Z","modified":"2024-08-05T10:32:54Z","title":"Smarty before 3.1.33-dev-4 allows attackers to bypass the trusted_dir protection mechanism via a file:./../ substring…","vendor":null,"product":null,"tier":"tail","description":{"text":"Smarty before 3.1.33-dev-4 allows attackers to bypass the trusted_dir protection mechanism via a file:./../ substring in an include statement.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.02664,"percentile":0.86076,"provenance":"source"},"cwes":[],"references":[{"url":"https://github.com/smarty-php/smarty/issues/486","tags":["x_refsource_MISC"]}],"priority":{"score":17.2,"factors":[{"name":"EPSS percentile","points":17.22}]},"affected":[{"ecosystem":"Packagist","package":"smarty/smarty","vulnerableRanges":["<3.1.33"],"patched":["3.1.33"],"from":["GHSA-65j5-vpm7-6xp4"],"provenance":"source"}],"summary":{"text":"Smarty, the PHP template engine, contains a flaw in its trusted_dir protection mechanism, which is meant to restrict where template files can be included from. An attacker who can influence an include statement can use a file:./../ substring to bypass that restriction and reach files outside the trusted directory.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:30:51Z"},"euvd":{"id":"EUVD-2022-2716","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-smarty-php-smarty-cve-2018-16831","children":[{"from":"CVE-2018-16831","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/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-16831","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/f9ca3c63d1250bb56b2bda609dcc9dd81f0065f8","https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90"],"basis":"shared function","functions":["_updateResourceDir"]}]}],"packageHistory":[{"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-16831","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":251}]}},{"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},{"cve":"CVE-2021-29454","published":"2022-01-10","fixed":"4.0.2","kev":false}],"package":"Packagist:smarty/smarty"}}