Servers and applications
CVE-2026-62992
Symlink path traversal out of trusted directories
- Severity
- Medium
- Published
- 20 Jul 2026
- Last changed
- 20 Jul 2026
- Added to UpHeron
- 3 Nov 2026
- Fixed in
- 4.5.7, 5.8.2
- Exploit chance
- 0.5% in the next 30 daysHigher than 45% of CVEs. EPSS by FIRST, 19 Nov 2026
- Weakness
- Path traversal (CWE-22)
- Also known as
- GHSA-f6wf-28g6-769x
- Sources
- Project advisories (GitHub)
Description
When Smarty's Security policy is enabled, secure_dir (and the configured template/trusted directories) restrict which local files a template may read via {include} and {fetch}. The trust check in Security::_checkDir() resolved the requested path with Smarty::_realpath(), which normalizes the path as a string only and does not follow symbolic links. A symlink placed inside a trusted directory therefore passed the trust check, while the underlying file_get_contents() followed it to an arbitrary file outside the sandbox (e.g. /etc/passwd).
An attacker able to (a) cause a symlink to exist inside a trusted directory (e.g. a user-upload area located within the template path) and (b) cause a template to reference that path can read arbitrary files readable by the PHP process, escaping the secure_dir boundary. Confidentiality impact only.
Workarounds
Ensure no untrusted symlinks can be created within any directory listed in secure_dir/the trusted template directories; restrict write access to those directories to trusted processes only.
Affected software
| Software | Affected versions |
|---|---|
SmartyServers and applications · github:smarty-php/smarty |
|
About Smarty
Web template system in PHP
- Monthly downloads (Packagist)
- 1,171,375Packagist, 15 Nov 2026
- Total downloads (Packagist)
- 46,435,268Packagist, 15 Nov 2026
- GitHub stars
- 2,351GitHub, 15 Nov 2026
- Forks
- 703GitHub, 15 Nov 2026
- Latest release
- v5.8.5GitHub, 15 Nov 2026
- Released
- 4 Oct 2026GitHub
- License
- GNU Lesser General Public LicenseWikidata
- Written in
- PHPWikidata
- First released
- 2001Wikidata
- First published on GitHub
- 30 Oct 2014GitHub
Vulnerabilities in Smarty
- In our list
- 36
- Published in the last 12 months
- 4
- Critical, last 12 months
- 1
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-82531Missing nocache-hash restoration lets assigned data inject executable PHP into regenerated cache filesCritical 9.2 4 Oct 2026
- CVE-2026-62996Smarty Security stream restriction bypass through stream: resourceMedium 20 Jul 2026
- CVE-2026-62993SSRF via redirect bypass of trusted_uri using {fetch}Medium 20 Jul 2026
- CVE-2024-35226PHP Code Injection by malicious attribute in extends-tagHigh 28 May 2024
- CVE-2023-41661Auth. (admin+) Stored Cross-Site Scripting (XSS) vulnerability in PressPage Entertainment Inc. Smarty for WordPress plugin <= 3.1.35 versions.Medium 4.8 29 Sept 2023
- CVE-2023-28447Cross site scripting vulnerability in Javascript escapingMedium 6.1 28 Mar 2023
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-62992
- GitHub Advisory Database https://github.com/advisories/GHSA-f6wf-28g6-769x
- github.com https://github.com/smarty-php/smarty/security/advisories/GHSA-f6wf-28g6-769x