{"id":"CVE-2026-62992","published":"2026-08-07T15:02:28Z","modified":"2026-08-07T16:00:28Z","title":"Smarty: Symlink path traversal out of trusted directories","vendor":"smarty-php","product":"smarty","tier":"tail","description":{"text":"Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to 5.8.2 (and 4.5.7 on the 4.x line), Security::_checkDir() does not fully resolve symbolic links before validating that a requested path lies within a configured secure directory. An attacker able to place or reference a symlink within a directory Smarty treats as trusted (e.g., a template or config directory) could use it to point outside the intended secure directory, bypassing the containment check and reading arbitrary files accessible to the PHP process. This issue is fixed in versions 5.8.2 and 4.5.7.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.9,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00533,"percentile":0.38477,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"}],"references":[{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-f6wf-28g6-769x","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/smarty-php/smarty/commit/99c048ce7a590c519b79fbd38ad0143a08183a1f","tags":["x_refsource_MISC"]},{"url":"https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90","tags":["x_refsource_MISC"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.5.7","tags":["x_refsource_MISC"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v5.8.2","tags":["x_refsource_MISC"]}],"priority":{"score":12.5,"factors":[{"name":"EPSS percentile","points":7.7},{"name":"CVSS severity","points":4.83}]},"vendorSlug":"smarty-php","affectedVersions":[{"vendor":"smarty-php","product":"smarty","versions":[">= 5.0.0, < 5.8.2","< 4.5.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-08-07T16:00:22.440207Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"smarty/smarty","vulnerableRanges":[">=5.0.0, <5.8.2","<4.5.7"],"patched":["5.8.2","4.5.7"],"from":["GHSA-f6wf-28g6-769x"],"provenance":"source"}],"summary":{"text":"The flaw is in Smarty, the PHP template engine, where its Security::_checkDir() function fails to fully resolve symbolic links before checking that a path lies within a trusted secure directory, affecting versions before 5.8.2 and 4.5.7 on the 4.x line. An attacker who can place or reference a symlink inside a directory Smarty treats as trusted, such as a template or config directory, and who holds high privileges over the application can use it to escape that directory and read arbitrary files the PHP process can access over the network.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:39:10Z"},"euvd":{"id":"EUVD-2026-54498","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-smarty-php-smarty-cve-2018-16831","parents":[{"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-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"]}]}],"packageHistory":[{"cve":"CVE-2018-25047","published":"2022-09-14","fixed":"4.2.1","kev":false},{"cve":"CVE-2023-28447","published":"2023-03-28","fixed":"4.3.1","kev":false},{"cve":"CVE-2024-35226","published":"2024-05-28","fixed":"5.1.1","kev":false},{"cve":"CVE-2026-62992","published":"2026-08-07","fixed":"5.8.2","kev":false},{"cve":"CVE-2026-62993","published":"2026-08-31","fixed":"5.8.2","kev":false},{"cve":"CVE-2026-62996","published":"2026-08-07","fixed":"5.8.4","kev":false,"link":{"from":"CVE-2026-62992","to":"CVE-2026-62996","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:smarty/smarty","fromFixed":"5.8.2","toFixed":"5.8.4","daysApart":0}]}}],"package":"Packagist:smarty/smarty"}}