CVE-2026-62992: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in smarty-php smarty
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.
AI Analysis
Technical Summary
Smarty, a PHP template engine, had a vulnerability (CVE-2026-62992) in its Security::_checkDir() function where symbolic links were not fully resolved before verifying that a requested path was within a secure directory. This improper limitation of pathname (CWE-22) could be exploited by an attacker able to place or reference a symlink inside a trusted directory, such as a template or config directory, to access files outside the intended directory. This vulnerability affects Smarty versions prior to 4.5.7 on the 4.x line and prior to 5.8.2 on the 5.x line. The vulnerability has a CVSS 4.0 score of 6.9 (medium severity) and does not require user interaction or elevated privileges beyond high-level privileges. The issue is resolved in versions 4.5.7 and 5.8.2.
Potential Impact
An attacker with the ability to place or reference symbolic links in directories trusted by Smarty can bypass directory containment checks and read arbitrary files accessible to the PHP process. This could lead to unauthorized disclosure of sensitive information. The vulnerability requires the attacker to have high privileges to place or reference symlinks in trusted directories. There is no indication of active exploitation in the wild.
Mitigation Recommendations
Upgrade Smarty to version 5.8.2 or later, or 4.5.7 or later on the 4.x line, where this vulnerability is fixed. No other official remediation or temporary fix is documented. Patch status is confirmed by the vendor advisory indicating fixed versions.
CVE-2026-62992: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in smarty-php smarty
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.
CVSS v4.0
Score 6.9medium
Affected software
pkg:composer/smarty-php/smartyRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Smarty, a PHP template engine, had a vulnerability (CVE-2026-62992) in its Security::_checkDir() function where symbolic links were not fully resolved before verifying that a requested path was within a secure directory. This improper limitation of pathname (CWE-22) could be exploited by an attacker able to place or reference a symlink inside a trusted directory, such as a template or config directory, to access files outside the intended directory. This vulnerability affects Smarty versions prior to 4.5.7 on the 4.x line and prior to 5.8.2 on the 5.x line. The vulnerability has a CVSS 4.0 score of 6.9 (medium severity) and does not require user interaction or elevated privileges beyond high-level privileges. The issue is resolved in versions 4.5.7 and 5.8.2.
Potential Impact
An attacker with the ability to place or reference symbolic links in directories trusted by Smarty can bypass directory containment checks and read arbitrary files accessible to the PHP process. This could lead to unauthorized disclosure of sensitive information. The vulnerability requires the attacker to have high privileges to place or reference symlinks in trusted directories. There is no indication of active exploitation in the wild.
Mitigation Recommendations
Upgrade Smarty to version 5.8.2 or later, or 4.5.7 or later on the 4.x line, where this vulnerability is fixed. No other official remediation or temporary fix is documented. Patch status is confirmed by the vendor advisory indicating fixed versions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-14T23:10:57.031Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a75f942bf8831d53989abbc
Added to database: 08/07/2026, 15:26:58 UTC
Last enriched: 08/07/2026, 16:03:24 UTC
Last updated: 08/07/2026, 16:11:50 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.