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
- 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?
Who can exploit CVE-2026-62993
- Access: No account. Anyone who can send a request to an app that uses the affected code.
- Conditions: It only works under specific conditions the attacker does not fully control (CVSS rates the attack as high complexity).
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
How to fix CVE-2026-62993 in smarty/smarty
- Find the installed version:
composer show smarty/smarty. If you never required it yourself,composer why smarty/smartyshows which package pulls it in. - 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). - 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. - Run
composer audit. It reads the same advisory data and should no longer list CVE-2026-62993. - Commit composer.lock and deploy it. On the server, run
composer install --no-devfrom the lock file, notcomposer update.
If you cannot upgrade yet
- Block outbound requests from the app server to private ranges and cloud metadata (169.254.169.254) at the firewall.
- Do not pass user-supplied URLs to the affected feature.
- If your app does not use the affected feature, note that in your audit, but still plan the upgrade.
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.
References
- GitHub advisory GHSA-cq55-c7wv-pxmq github.com
- Fix commit 31e06fc github.com
- Fix commit a1ccdb0 github.com
- Pull request #1194 github.com
- Release v4.5.7 github.com
- Release v5.8.2 github.com
Other smarty/smarty advisories
- medium CVE-2026-62996: Smarty Security stream restriction bypass through stream: resource 2026-08-07
- medium CVE-2026-62992: Smarty: Symlink path traversal out of trusted directories 2026-08-07
- high CVE-2024-35226: Smarty vulnerable to PHP Code Injection by malicious attribute in extends-tag 2024-05-29
- high CVE-2023-28447: Cross site scripting vulnerability in Javascript escaping 2023-03-28
- medium CVE-2018-25047: Smarty_function_mailto - JavaScript injection in eval function 2022-09-14
- high CVE-2022-29221: PHP Code Injection by malicious block or filename 2022-05-17
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 fixWhere this data comes from
- Affected and fixed versions: the Packagist security advisories API (GitHub Advisory Database and FriendsOfPHP), the same data
composer audituses. Synced 2026-11-03. - Description, score, weakness and references: NIST National Vulnerability Database (NVD), checked 2026-11-04. This product uses data from the NVD API but is not endorsed or certified by the NVD.
- Exploited-in-the-wild status: the CISA Known Exploited Vulnerabilities catalog, checked 2026-11-04.
- Compiled by Daniel Lasek at Laskyr from the sources above. The summary, “who can exploit it”, “how to fix it” and hardening sections are our plain-English reading of the record and are generated from it. The quoted description is the record's own text. Spot an error? Tell us.