Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. smarty/smarty
  4. ›
  5. CVE-2026-62992

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

August 7, 2026

When Smarty’s Security policy is enabled, secure_dir (and the configured template/trusted directories) restrict which local files a template may read via {include} and {fetch}. The trust check in Security::_checkDir() resolved the requested path with Smarty::_realpath(), which normalizes the path as a string only and does not follow symbolic links. A symlink placed inside a trusted directory therefore passed the trust check, while the underlying file_get_contents() followed it to an arbitrary file outside the sandbox (e.g. /etc/passwd).

References

  • github.com/advisories/GHSA-f6wf-28g6-769x
  • github.com/smarty-php/smarty/commit/99c048ce7a590c519b79fbd38ad0143a08183a1f
  • github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90
  • github.com/smarty-php/smarty/releases/tag/v4.5.7
  • github.com/smarty-php/smarty/releases/tag/v5.8.2
  • github.com/smarty-php/smarty/security/advisories/GHSA-f6wf-28g6-769x
  • nvd.nist.gov/vuln/detail/CVE-2026-62992

Code Behaviors & Features

Detect and mitigate CVE-2026-62992 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.5.7, all versions starting from 5.0.0 before 5.8.2

Fixed versions

  • 4.5.7
  • 5.8.2

Solution

Upgrade to versions 4.5.7, 5.8.2 or above.

Impact 4.9 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-61: UNIX Symbolic Link (Symlink) Following

Source file

packagist/smarty/smarty/CVE-2026-62992.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 07 Sep 2026 12:17:48 +0000.