Skip to content
Laskyr

smarty/smarty security advisory

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

CVE-2026-62992 is a medium-severity path traversal vulnerability in the PHP package smarty/smarty (CVSS 6.9), published 7 August 2026. It is fixed in 4.5.7 and 5.8.2, one per release line; earlier versions on each line are affected. Exploiting it needs an admin-level account.

medium 6.9 published 2026-08-07 · updated 2026-10-24

Fixed in smarty/smarty 4.5.7 and 5.8.2

This path traversal issue affects smarty/smarty in 2 release lines: < 4.5.7; >= 5.0.0, < 5.8.2. Upgrade to the fixed version for your release line (4.5.7 and 5.8.2). The newest release, 5.8.5, is not affected.

Affected versions
< 4.5.7
>= 5.0.0, < 5.8.2
Fixed in
4.5.7, 5.8.2
Newest release
5.8.5
Severity
Medium · CVSS 6.9
Type
Path traversal / file read
CWE-22, CWE-61
Exploited in the wild
Not on the CISA KEV list
checked 2026-11-04

Is your smarty/smarty version affected?

Run composer show smarty/smarty in your project, then enter the version. We check it against this and every other known smarty/smarty advisory.

Who can exploit CVE-2026-62992

CVSS vector (scored by GitHub): 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

Your app is only exposed if it uses the affected part of smarty/smarty. The advisory below says which part that is. If you are not sure, upgrade anyway: it costs less than finding out.

How to fix CVE-2026-62992 in smarty/smarty

  1. Find the installed version: composer show smarty/smarty. If you never required it yourself, composer why smarty/smarty shows which package pulls it in.
  2. Update it: composer update smarty/smarty --with-all-dependencies. You need the fixed version for your release line (4.5.7 and 5.8.2).
  3. If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example "smarty/smarty": "^5.8.2" if you can take that version), or upgrade the package that requires it.
  4. Run composer audit. It reads the same advisory data and should no longer list CVE-2026-62992.
  5. Commit composer.lock and deploy it. On the server, run composer install --no-dev from the lock file, not composer update.

If you cannot upgrade yet

General hardening for path traversal issues while the upgrade waits. None of it replaces the fix.

The CVE-2026-62992 advisory

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.

Description from the CVE record, published by GitHub (the CVE Numbering Authority), via the NVD entry for CVE-2026-62992. Advisory title: “Smarty: Symlink path traversal out of trusted directories”.

References

Other smarty/smarty advisories

Related

Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.

Ask about a fix

Where this data comes from

First hour checklist

If the site was just hacked, read the emergency kit before you delete files. The page is free. Email is optional.

Read the emergency kit