{"id":"GHSA-cq55-c7wv-pxmq","aliases":["CVE-2026-62993"],"title":"Smarty: SSRF via redirect bypass of trusted_uri using {fetch}","titleSource":"OSV","descriptionSource":"OSV","declaredSeverity":"MODERATE","description":"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 => 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.\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.","severity":"medium","score":6.9,"published":"2026-09-01T16:38:22.000Z","modified":"2026-09-01T16:45:03.888Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Packagist","name":"smarty/smarty","sources":[{"name":"OSV · GHSA-cq55-c7wv-pxmq","url":"https://osv.dev/vulnerability/GHSA-cq55-c7wv-pxmq"}],"ranges":[{"events":[{"introduced":"5.0.0"},{"fixed":"5.8.2"}],"type":"ECOSYSTEM"}],"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"],"fixed":["5.8.2"]},{"ecosystem":"Packagist","name":"smarty/smarty","sources":[{"name":"OSV · GHSA-cq55-c7wv-pxmq","url":"https://osv.dev/vulnerability/GHSA-cq55-c7wv-pxmq"}],"ranges":[{"events":[{"introduced":"0"},{"fixed":"4.5.7"}],"type":"ECOSYSTEM"}],"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"],"fixed":["4.5.7"]}],"sourceAffected":[],"references":["https://github.com/smarty-php/smarty/security/advisories/GHSA-cq55-c7wv-pxmq","https://nvd.nist.gov/vuln/detail/CVE-2026-62993","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","https://github.com/smarty-php/smarty/releases/tag/v4.5.7","https://github.com/smarty-php/smarty/releases/tag/v5.8.2"],"sources":[{"name":"OSV","id":"GHSA-cq55-c7wv-pxmq","modified":"2026-09-01T16:45:03.888970124Z","url":"https://osv.dev/vulnerability/GHSA-cq55-c7wv-pxmq"}],"assessments":[{"source":"OSV","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","score":6.9}],"products":[],"remediation":[],"kev":{"status":"not-listed","checkedAt":"2026-10-29T01:35:32.302Z"},"coverage":[{"source":"NVD","status":"not-checked"},{"source":"GHSA","status":"not-checked"},{"source":"EUVD","status":"not-checked"},{"source":"EPSS","status":"not-checked"}],"evidence":[]}