{"id":"GHSA-cq55-c7wv-pxmq","summary":"Smarty: SSRF via redirect bypass of trusted_uri using {fetch}","details":"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.\n\n## Impact\n\nAn 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).\n\n## Patches\n\nFixed in 5.8.2. When a security policy is active, {fetch} now passes a stream context that disables redirect following (follow_location =\u003e 0, max_redirects =\u003e 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.\n\n## Workarounds\n\nAvoid fetching remote resources from within templates under untrusted control; ensure hosts listed in trusted_uri do not expose open redirects.","aliases":["CVE-2026-62993"],"modified":"2026-09-01T16:45:03.888970124Z","published":"2026-09-01T16:38:22Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2026-09-01T16:38:22Z","nvd_published_at":"2026-08-31T21:17:33Z","cwe_ids":["CWE-918"],"severity":"MODERATE"},"references":[{"type":"WEB","url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-cq55-c7wv-pxmq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62993"},{"type":"WEB","url":"https://github.com/smarty-php/smarty/pull/1194"},{"type":"WEB","url":"https://github.com/smarty-php/smarty/commit/31e06fc087a8b5a9b236c1e5dacc1c2850a2c115"},{"type":"WEB","url":"https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90"},{"type":"PACKAGE","url":"https://github.com/smarty-php/smarty"},{"type":"WEB","url":"https://github.com/smarty-php/smarty/releases/tag/v4.5.7"},{"type":"WEB","url":"https://github.com/smarty-php/smarty/releases/tag/v5.8.2"}],"affected":[{"package":{"name":"smarty/smarty","ecosystem":"Packagist","purl":"pkg:composer/smarty/smarty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0.0"},{"fixed":"5.8.2"}]}],"versions":["v5.0.0","v5.0.1","v5.0.2","v5.1.0","v5.2.0","v5.3.0","v5.3.1","v5.4.0","v5.4.1","v5.4.2","v5.4.3","v5.4.4","v5.4.5","v5.5.0","v5.5.1","v5.5.2","v5.6.0","v5.7.0","v5.8.0","v5.8.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-cq55-c7wv-pxmq/GHSA-cq55-c7wv-pxmq.json"}},{"package":{"name":"smarty/smarty","ecosystem":"Packagist","purl":"pkg:composer/smarty/smarty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5.7"}]}],"versions":["v2.6.24","v2.6.25","v2.6.26","v2.6.27","v2.6.28","v2.6.29","v2.6.30","v2.6.31","v2.6.33","v3.1.11","v3.1.12","v3.1.13","v3.1.14","v3.1.15","v3.1.16","v3.1.17","v3.1.18","v3.1.19","v3.1.20","v3.1.21","v3.1.23","v3.1.24","v3.1.25","v3.1.26","v3.1.27","v3.1.28","v3.1.29","v3.1.30","v3.1.31","v3.1.32","v3.1.33","v3.1.34","v3.1.35","v3.1.36","v3.1.37","v3.1.37.1","v3.1.38","v3.1.39","v3.1.40","v3.1.41","v3.1.42","v3.1.43","v3.1.44","v3.1.45","v3.1.46","v3.1.47","v3.1.48","v4.0.0","v4.0.0-rc.0","v4.0.1","v4.0.2","v4.0.3","v4.0.4","v4.1.0","v4.1.1","v4.2.0","v4.2.1","v4.3.0","v4.3.1","v4.3.2","v4.3.3","v4.3.4","v4.3.5","v4.4.0","v4.4.1","v4.5.0","v4.5.1","v4.5.2","v4.5.3","v4.5.4","v4.5.5","v4.5.6"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-cq55-c7wv-pxmq/GHSA-cq55-c7wv-pxmq.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}