Vulnerability · Published Aug 7, 2026 · Assigned by GitHub_M

CVE-2026-62992Smarty: Symlink path traversal out of trusted directories

Medium 6.9

In plain English

A medium-severity path traversal in smarty from smarty-php. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 45% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.9Medium
Exploit odds (30 days)0.5%top 54.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12smarty3no fix listedDEBIAN-CVE-2026-62992
Debian:13smarty3no fix listedDEBIAN-CVE-2026-62992
Debian:14smarty3no fix listedDEBIAN-CVE-2026-62992
Debian:12smarty4no fix listedDEBIAN-CVE-2026-62992
Debian:13smarty4no fix listedDEBIAN-CVE-2026-62992
Debian:14smarty4no fix listedDEBIAN-CVE-2026-62992
Packagistsmarty/smarty5.8.2GHSA-f6wf-28g6-769x
Packagistsmarty/smarty4.5.7GHSA-f6wf-28g6-769x
Ubuntu:22.04:LTSsmarty3no fix listedUBUNTU-CVE-2026-62992
Ubuntu:24.04:LTSsmarty3no fix listedUBUNTU-CVE-2026-62992
Ubuntu:26.04:LTSsmarty3no fix listedUBUNTU-CVE-2026-62992
Ubuntu:26.10smarty3no fix listedUBUNTU-CVE-2026-62992
Ubuntu:24.04:LTSsmarty4no fix listedUBUNTU-CVE-2026-62992
Ubuntu:26.04:LTSsmarty4no fix listedUBUNTU-CVE-2026-62992
Ubuntu:26.10smarty4no fix listedUBUNTU-CVE-2026-62992

Affected products (as reported)

VendorProductVersions
smarty-php smarty >= 5.0.0, < 5.8.2< 4.5.7

Weakness: CWE-22, CWE-61 · 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

References