CVE-2026-62993
Smarty: SSRF via redirect bypass of trusted_uri using {fetch}
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.9
Smarty: SSRF via redirect bypass of trusted_uri using {fetch}
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.
- Record
CVE-2026-62993- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-918
- Updated
- 2026-11-02
EUVDEUVD-2026-68814
6.9
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.
- Record
EUVD-2026-68814- CVSS 4.0
- 6.9 Medium
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-cq55-c7wv-pxmq
6.9
Smarty: SSRF via redirect bypass of trusted_uri using {fetch}
When a Security policy is active, {fetch} validates the requested remote URL against the trusted_uri allowlist via Security::isTrustedUri(). For non-http:// schemes (e.g. https://) the resource was then read with file_get_contents(), which follows HTTP redirects by default. Because isTrustedUri() only validates the initial URL, an open redirect on an otherwise-trusted host could be used to redirect the request to a non-trusted, internal target — bypassing the trusted_uri policy.
Impact
An attacker who can supply a fetch target (or influence one) and who has an open redirect available on a trusted host can cause the server to issue requests to attacker-chosen internal endpoints, defeating the trusted_uri allowlist (server-side request forgery).
Patches
Fixed in 5.8.2. When a security policy is active, {fetch} now passes a stream context that disables redirect following (follow_location => 0, max_redirects => 1) to file_get_contents() for remote resources. Behavior is unchanged when no security policy is set, since there is no trusted_uri to bypass.
Workarounds
Avoid fetching remote resources from within templates under untrusted control; ensure hosts listed in trusted_uri do not expose open redirects.
- Record
GHSA-cq55-c7wv-pxmq- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-918
- Updated
- 2026-11-02
NVD
6.9
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.
- Record
CVE-2026-62993- CVSS 4.0
- 6.9 Medium
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-918
- Updated
- 2026-11-02
OSV
6.9
Smarty: SSRF via redirect bypass of trusted_uri using {fetch}
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.
- Record
CVE-2026-62993- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-918
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-62993
6.9
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.
- Record
DEBIAN-CVE-2026-62993- CVSS 4.0
- 6.9 Medium
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVGHSA-cq55-c7wv-pxmq
6.9
Smarty: SSRF via redirect bypass of trusted_uri using {fetch}
When a Security policy is active, {fetch} validates the requested remote URL against the trusted_uri allowlist via Security::isTrustedUri(). For non-http:// schemes (e.g. https://) the resource was then read with file_get_contents(), which follows HTTP redirects by default. Because isTrustedUri() only validates the initial URL, an open redirect on an otherwise-trusted host could be used to redirect the request to a non-trusted, internal target — bypassing the trusted_uri policy.
Impact
An attacker who can supply a fetch target (or influence one) and who has an open redirect available on a trusted host can cause the server to issue requests to attacker-chosen internal endpoints, defeating the trusted_uri allowlist (server-side request forgery).
Patches
Fixed in 5.8.2. When a security policy is active, {fetch} now passes a stream context that disables redirect following (follow_location => 0, max_redirects => 1) to file_get_contents() for remote resources. Behavior is unchanged when no security policy is set, since there is no trusted_uri to bypass.
Workarounds
Avoid fetching remote resources from within templates under untrusted control; ensure hosts listed in trusted_uri do not expose open redirects.
- Record
GHSA-cq55-c7wv-pxmq- CVSS 4.0
- 6.9 Medium
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 - Weakness
- CWE-918
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-62993
6.9
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.
- Record
UBUNTU-CVE-2026-62993- CVSS 4.0
- 6.9 Medium
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 - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
smarty/smartyPackagist |
5.0.0 up to 5.8.2 | 5.8.2 |
smarty/smartyPackagist |
before 4.5.7 | 4.5.7 |
smarty3Debian:12 |
All versions, plus listed versions 3.1.47-23.1.47-2+deb12u13.1.48-13.1.48-2 |
None known |
smarty3Debian:13 |
All versions, plus listed versions 3.1.48-2 |
None known |
smarty3Debian:14 |
All versions, plus listed versions 3.1.48-2 |
None known |
smarty4Debian:12 |
All versions, plus listed versions 4.3.0-14.3.0-1+deb12u14.3.0-1+deb12u24.3.1-14.5.4-14.5.5-1 |
None known |
smarty4Debian:13 |
All versions, plus listed versions 4.5.5-1 |
None known |
smarty4Debian:14 |
All versions, plus listed versions 4.5.5-1 |
None known |
smarty/smartyPackagist |
5.0.0 up to 5.8.2, plus listed versions v5.0.0v5.0.1v5.0.2v5.1.0v5.2.0 Show 15 moreShow lessv5.3.0v5.3.1v5.4.0v5.4.1v5.4.2v5.4.3v5.4.4v5.4.5v5.5.0v5.5.1v5.5.2v5.6.0v5.7.0v5.8.0v5.8.1 |
5.8.2 |
smarty/smartyPackagist |
before 4.5.7, plus listed versions v2.6.24v2.6.25v2.6.26v2.6.27v2.6.28 Show 45 moreShow lessv2.6.29v2.6.30v2.6.31v2.6.33v3.1.11v3.1.12v3.1.13v3.1.14v3.1.15v3.1.16v3.1.17v3.1.18v3.1.19v3.1.20v3.1.21v3.1.23v3.1.24v3.1.25v3.1.26v3.1.27v3.1.28v3.1.29v3.1.30v3.1.31v3.1.32v3.1.33v3.1.34v3.1.35v3.1.36v3.1.37v3.1.37.1v3.1.38v3.1.39v3.1.40v3.1.41v3.1.42v3.1.43v3.1.44v3.1.45v3.1.46v3.1.47v3.1.48v4.0.0v4.0.0-rc.0v4.0.1 |
4.5.7 |
Show 10 moreShow less
| Package | Affected | Fixed |
|---|---|---|
smarty3Ubuntu:Pro:16.04:LTS |
All versions, plus listed versions 3.1.21-13.1.21-1ubuntu13.1.21-1ubuntu1+esm13.1.21-1ubuntu1+esm2 |
None known |
smarty3Ubuntu:Pro:18.04:LTS |
All versions, plus listed versions 3.1.31+20161214.1.c7d42e4+selfpack1-23.1.31+20161214.1.c7d42e4+selfpack1-33.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.13.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1 |
None known |
smarty3Ubuntu:Pro:20.04:LTS |
All versions, plus listed versions 3.1.33+20180830.1.3a78a21f+selfpack1-13.1.34+20190228.1.c9f0de05+selfpack1-13.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm13.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.13.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1+esm1 |
None known |
smarty3Ubuntu:22.04:LTS |
All versions, plus listed versions 3.1.39-23.1.39-2ubuntu13.1.39-2ubuntu1.22.04.13.1.39-2ubuntu1.22.04.2 |
None known |
smarty3Ubuntu:24.04:LTS |
All versions, plus listed versions 3.1.48-13.1.48-1ubuntu0.24.04.1 |
None known |
smarty4Ubuntu:24.04:LTS |
All versions, plus listed versions 4.3.1-14.3.1-1ubuntu0.24.04.1 |
None known |
smarty3Ubuntu:26.10 |
All versions, plus listed versions 3.1.48-2build1 |
None known |
smarty4Ubuntu:26.10 |
All versions, plus listed versions 4.5.5-1 |
None known |
smarty3Ubuntu:26.04:LTS |
All versions, plus listed versions 3.1.48-23.1.48-2build1 |
None known |
smarty4Ubuntu:26.04:LTS |
All versions, plus listed versions 4.5.5-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-62993 is a medium vulnerability (CVSS 6.9) in Smarty-php Smarty, published August 31, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.57%, the 47th percentile. Fixed in smarty/smarty 5.8.2.
References
github.com/smarty-php/smarty/security/advisories/GHSA-cq55-c7wv-pxmq
github.com/smarty-php/smarty/pull/1194
github.com/smarty-php/smarty/commit/31e06fc087a8b5a9b236c1e5dacc1c2850a2c115
github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90
github.com/smarty-php/smarty/releases/tag/v4.5.7
github.com/smarty-php/smarty/releases/tag/v5.8.2
Show 7 moreShow less
nvd.nist.gov/vuln/detail/CVE-2026-62993
github.com/advisories/GHSA-cq55-c7wv-pxmq
github.com/CVEProject/cvelistV5/tree/main/cves/2026/62xxx/CVE-2026-62993.json
security-tracker.debian.org/tracker/CVE-2026-62993
github.com/smarty-php/smarty
ubuntu.com/security/CVE-2026-62993
cve.org/CVERecord?id=CVE-2026-62993
Left out here: 22 versions. The JSON record has them.