Smarty: Symlink path traversal out of trusted directories
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-22 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| smarty-php | smarty | 5.0.0 to before 5.8.2; before 4.5.7 | 5.8.2, 4.5.7 | Patch available | CNA |
| — | smarty/smarty (Packagist) | 5.0.0 to before 5.8.2 | 5.8.2 | Patch available | GHSA-f6wf-28g6-769x |
| — | smarty/smarty (Packagist) | before 4.5.7 | 4.5.7 | Patch available | GHSA-f6wf-28g6-769x |
- smarty Vendorsmarty-php Affected 5.0.0 to before 5.8.2; before 4.5.7 Fixed in 5.8.2, 4.5.7 Patch available CNA
- smarty/smarty (Packagist) Vendor— Affected 5.0.0 to before 5.8.2 Fixed in 5.8.2 Patch available GHSA-f6wf-28g6-769x
- smarty/smarty (Packagist) Vendor— Affected before 4.5.7 Fixed in 4.5.7 Patch available GHSA-f6wf-28g6-769x
Remediation
- Fix · CNA smarty (smarty-php) Fixed in 5.8.2, 4.5.7
- Fix · GHSA-f6wf-28g6-769x smarty/smarty (Packagist) Fixed in 5.8.2 Advisory →
- Fix · GHSA-f6wf-28g6-769x smarty/smarty (Packagist) Fixed in 4.5.7 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-62992
- 2026-10-03 Alias added: GHSA-f6wf-28g6-769x
References
Other 6
- https://github.com/smarty-php/smarty/security/advisories/GHSA-f6wf-28g6-769x
- https://github.com/smarty-php/smarty/commit/99c048ce7a590c519b79fbd38ad0143a08183a1f
- https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90
- https://github.com/smarty-php/smarty/releases/tag/v4.5.7
- https://github.com/smarty-php/smarty/releases/tag/v5.8.2
- https://github.com/smarty-php/smarty
More smarty-php vulnerabilities
- TI-2021-08070 Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring. CVSS 3.1CRITICAL 9.8
- TI-2026-68416 Code injection in Smarty via extends: inheritance cache CVSS 4.0CRITICAL 9.2
- TI-2026-44997 Smarty Security stream restriction bypass through stream: resource CVSS 4.0MEDIUM 6.9
- TI-2009-01585 The smarty_function_math function in libs/plugins/function.math.php in Smarty 2.6.22… CVSS 2.0HIGH 10.0
- TI-2006-06846 PHP remote file inclusion vulnerability in libs/Smarty.class.php in Smarty 2.6.9 allows… CVSS 3.1CRITICAL 9.8
- TI-2022-11764 PHP Code Injection by malicious block or filename in Smarty CVSS 3.1HIGH 8.8
Sources
- CVE-2026-62992 · CVE Program
- CVE-2026-62992 · NVD
- FIRST EPSS
- GHSA-f6wf-28g6-769x · GitHub Advisory Database · CC BY 4.0
- CVE-2026-62992 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences