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

Published Aug 31, 2026
·
Updated

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 trusteduri when a security policy was active. For resources handled by filegetcontents(), 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 trusteduri allowlist, and perform server-side request forgery. This issue is fixed in versions 4.5.7 and 5.8.2.

Affected Software

1 affected component
Smarty smarty>4.5.7<5.8.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Smarty to a version that resolves this vulnerability.

    Fixed in 4.5.7
  2. Upgrade

    Upgrade Smarty to a version that resolves this vulnerability.

    Fixed in 5.8.2

Event History

Aug 31, 2026
CVE Published
via MITRE·08:58 PM
Data Sourced
via MITRE·08:58 PM
DescriptionWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Deployments using Smarty before 4.5.7 or 5.8.2 are exposed if a security policy is active, {fetch} can be supplied or influenced by an attacker, and a trusted_uri-allowlisted host has an open redirect.

2

What does an attacker need to exploit the bypass?

The attacker needs to control or influence the URL passed to {fetch} and use an open redirect on a host permitted by trusted_uri. The redirect can then send the server-side request to an attacker-chosen internal endpoint.

3

Are HTTPS fetch targets affected?

Yes. Resources handled through file_get_contents(), including HTTPS URLs, can be affected because PHP follows HTTP redirects by default.

4

How can this be remediated?

Upgrade Smarty to version 4.5.7 on the 4.x release line or 5.8.2 on the 5.x release line.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203