CVE-2026-62992 Details
Description
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.
A path traversal vulnerability has been identified in the Smarty template engine for PHP, affecting versions 5.0.0 through 5.8.1 and prior to 4.5.7. The issue arises because the Security::_checkDir() function does not fully resolve symbolic links before validating if a path is within a secure directory. This flaw allows an attacker to place or reference a symlink in a directory that Smarty considers trusted, such as a template or configuration directory. The symlink can be used to point to files outside the secure directory, bypassing containment checks and potentially allowing access to arbitrary files readable by the PHP process.
Users can upgrade to Smarty versions 5.8.2 or 4.5.7, where this vulnerability has been fixed. The patch involves updating the Security::_checkDir() function to resolve paths with the native realpath() function, ensuring that symlinks are properly handled before validating directory access.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 7, 2026CISA-ADP
Assessed Aug 7, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/smarty-php/smarty/commit/99c048ce7a590c519b79fbd38ad0143a08183a1f | [email protected] | Source CodeVendor |
| https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90 | [email protected] | BundleSource CodeVendor |
| https://github.com/smarty-php/smarty/releases/tag/v4.5.7 | [email protected] | Release NotesVendor |
| https://github.com/smarty-php/smarty/releases/tag/v5.8.2 | [email protected] | Release NotesVendor |
| https://github.com/smarty-php/smarty/security/advisories/GHSA-f6wf-28g6-769x | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
| CWE-61 | UNIX Symbolic Link (Symlink) Following | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Smarty | >= 5.0.0, < 5.8.2 (semver) < 4.5.7 (semver) |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 24, 2026 | CVE Translated | [email protected] |
| Oct 23, 2026 | CVE Translated | [email protected] |
| Aug 7, 2026 | New CVE Received | [email protected] |
| Aug 7, 2026 | CVE Modified | CISA-ADP |
Volerion