Every CVE Search/ Get API key

CVE-2026-62993

Smarty: SSRF via redirect bypass of trusted_uri using {fetch}

6.9 MediumFix available

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

0.57%Up 0.2 points since Sep 1, 2026
90%50%10%1%

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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
smarty/smarty
Packagist
5.0.0 up to 5.8.2
5.8.2
smarty/smarty
Packagist
before 4.5.7
4.5.7
smarty3
Debian:12
All versions, plus listed versions
3.1.47-23.1.47-2+deb12u13.1.48-13.1.48-2
None known
smarty3
Debian:13
All versions, plus listed versions
3.1.48-2
None known
smarty3
Debian:14
All versions, plus listed versions
3.1.48-2
None known
smarty4
Debian: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
smarty4
Debian:13
All versions, plus listed versions
4.5.5-1
None known
smarty4
Debian:14
All versions, plus listed versions
4.5.5-1
None known
smarty/smarty
Packagist
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 less
v5.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/smarty
Packagist
before 4.5.7, plus listed versions
v2.6.24v2.6.25v2.6.26v2.6.27v2.6.28
Show 45 moreShow less
v2.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
Affected packages
PackageAffectedFixed
smarty3
Ubuntu: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
smarty3
Ubuntu: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
smarty3
Ubuntu: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
smarty3
Ubuntu: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
smarty3
Ubuntu:24.04:LTS
All versions, plus listed versions
3.1.48-13.1.48-1ubuntu0.24.04.1
None known
smarty4
Ubuntu:24.04:LTS
All versions, plus listed versions
4.3.1-14.3.1-1ubuntu0.24.04.1
None known
smarty3
Ubuntu:26.10
All versions, plus listed versions
3.1.48-2build1
None known
smarty4
Ubuntu:26.10
All versions, plus listed versions
4.5.5-1
None known
smarty3
Ubuntu:26.04:LTS
All versions, plus listed versions
3.1.48-23.1.48-2build1
None known
smarty4
Ubuntu:26.04:LTS
All versions, plus listed versions
4.5.5-1
None known

History

History
RecordedChangedSources
first indexedCVE 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

Show 7 moreShow less
This page doesn't list everything

Left out here: 22 versions. The JSON record has them.

MoveEnter Open