CVE-2026-62992: Smarty Package Symlink Path Traversal Vulnerability

smarty/smarty Updated 07 Aug 2026

Summary

07/08/2026
Yes i
Moderate
6.9

CVE-2026-62992: Smarty: Symlink path traversal out of trusted directories. Affects smarty/smarty across 2 version ranges.

< 4.5.7 >= 5.0.0, < 5.8.2

Fixed in 4.5.7 or 5.8.2, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Smarty is a popular template engine for PHP, widely used for its ability to separate the presentation layer from the business logic. It allows developers to create dynamic web pages with ease. However, when its Security policy is enabled, it restricts access to local files through a configuration known as secure_dir. This vulnerability arises from the way Smarty handles symbolic links within trusted directories, potentially exposing sensitive files to unauthorized access.

Vulnerability Detail

The vulnerability stems from Smarty's Security::_checkDir() method, which uses Smarty::_realpath() to normalize file paths without following symbolic links. This oversight allows an attacker to create a symlink within a trusted directory that points to an arbitrary file outside the secure_dir boundary. If a template references this symlink, it can lead to unauthorized reading of sensitive files, such as /etc/passwd, thus compromising confidentiality.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 4.5.7 4.5.7
    composer require smarty/smarty:4.5.7
  • >= 5.0.0, < 5.8.2 5.8.2
    composer require smarty/smarty:5.8.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary measure, ensure that no untrusted symlinks can be created within any directory listed in secure_dir or the trusted template directories. Restrict write access to these directories to trusted processes only.

Conclusion

The CVE-2026-62992 vulnerability in the Smarty package poses a significant risk due to its potential to expose sensitive files through symlink path traversal. It is crucial for developers using Smarty to update to the patched versions and implement recommended workarounds to safeguard their applications.

See every vulnerability recorded for smarty/smarty →

Share this vulnerability

FAQ

The vulnerability allows an attacker to read arbitrary files that are accessible by the PHP process, potentially exposing sensitive information.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup.

Versions prior to 5.8.2 in the 5.x series and prior to 4.5.7 in the 4.x series are affected by this vulnerability.

The CVSS score for this vulnerability is 6.9, indicating a moderate severity level.

If an immediate update is not possible, implement the suggested workarounds to mitigate the risk until you can apply the patch.

Related vulnerabilities

Recent vulnerabilities recorded for smarty/smarty.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 4.5.7 4.5.7
    composer require smarty/smarty:4.5.7
  • >= 5.0.0, < 5.8.2 5.8.2
    composer require smarty/smarty:5.8.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback