Skip to content
Laskyr

smarty/smarty security advisory

CVE-2026-62993: Smarty: SSRF via redirect bypass of trusted_uri using {fetch}

CVE-2026-62993 is a medium-severity SSRF vulnerability in the PHP package smarty/smarty (CVSS 6.9), published 31 August 2026. It is fixed in 4.5.7 and 5.8.2, one per release line; earlier versions on each line are affected. It can be exploited without an account.

medium 6.9 published 2026-08-31 · updated 2026-09-08

Fixed in smarty/smarty 4.5.7 and 5.8.2

This SSRF 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
Server-side request forgery (SSRF)
CWE-918
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-62993

CVSS vector (scored by GitHub): CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/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-62993 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-62993.
  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 SSRF issues while the upgrade waits. None of it replaces the fix.

The CVE-2026-62993 advisory

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to 4.5.7 and 5.8.2, depending on the release line, Smarty's {fetch} handling in libs/plugins/function.fetch.php and src/FunctionHandler/Fetch.php used Security::isTrustedUri() to validate only the initial remote URL against trusted_uri when a security policy was active. For resources handled by file_get_contents(), including HTTPS URLs, PHP followed HTTP redirects by default. An attacker who could supply or influence a fetch target and had an open redirect on a trusted host could redirect the request to an attacker-chosen internal endpoint, bypass the trusted_uri allowlist, and perform server-side request forgery. This issue is fixed in versions 4.5.7 and 5.8.2.

Description from the CVE record, published by GitHub (the CVE Numbering Authority), via the NVD entry for CVE-2026-62993. Advisory title: “Smarty: SSRF via redirect bypass of trusted_uri using {fetch}”.

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