{"id":"CVE-2026-62993","published":"2026-08-31T20:58:03Z","modified":"2026-09-02T17:36:30Z","title":"Smarty: SSRF via redirect bypass of trusted_uri using {fetch}","vendor":"smarty-php","product":"smarty","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.9,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00574,"percentile":0.41276,"provenance":"source"},"cwes":[{"id":"CWE-918","name":"Server-Side Request Forgery"}],"references":[{"url":"https://github.com/smarty-php/smarty/security/advisories/GHSA-cq55-c7wv-pxmq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/smarty-php/smarty/pull/1194","tags":["x_refsource_MISC"]},{"url":"https://github.com/smarty-php/smarty/commit/31e06fc087a8b5a9b236c1e5dacc1c2850a2c115","tags":["x_refsource_MISC"]},{"url":"https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90","tags":["x_refsource_MISC"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v4.5.7","tags":["x_refsource_MISC"]},{"url":"https://github.com/smarty-php/smarty/releases/tag/v5.8.2","tags":["x_refsource_MISC"]}],"priority":{"score":13.1,"factors":[{"name":"EPSS percentile","points":8.26},{"name":"CVSS severity","points":4.83}]},"vendorSlug":"smarty-php","affectedVersions":[{"vendor":"smarty-php","product":"smarty","versions":[">= 5.0.0, < 5.8.2","< 4.5.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-09-02T17:36:17.333670Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"smarty/smarty","vulnerableRanges":[">=5.0.0, <5.8.2","<4.5.7"],"patched":["5.8.2","4.5.7"],"from":["GHSA-cq55-c7wv-pxmq"],"provenance":"source"}],"summary":{"text":"Smarty, a PHP template engine, has a server-side request forgery flaw in its {fetch} handling (libs/plugins/function.fetch.php and src/FunctionHandler/Fetch.php) where only the initial URL is checked against trusted_uri when a security policy is active, and HTTP redirects followed by file_get_contents() are not re-validated. An attacker who can supply or influence a fetch target, and who has an open redirect on a trusted host, can make the server request an internal endpoint of their choice, provided the template uses {fetch} with a security policy in effect.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:35:59Z"},"euvd":{"id":"EUVD-2026-68814","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-smarty-php-smarty-cve-2018-16831","parents":[{"from":"CVE-2018-16831","to":"CVE-2026-62993","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["libs/sysplugins/smarty_security.php"],"commits":["https://github.com/smarty-php/smarty/commit/f9ca3c63d1250bb56b2bda609dcc9dd81f0065f8","https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90"],"basis":"shared function","functions":["_updateResourceDir"]}]},{"from":"CVE-2018-13982","to":"CVE-2026-62993","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["libs/sysplugins/smarty_security.php"],"commits":["https://github.com/smarty-php/smarty/commit/2e081a51b1effddb23f87952959139ac62654d50","https://github.com/smarty-php/smarty/commit/f9ca3c63d1250bb56b2bda609dcc9dd81f0065f8","https://github.com/smarty-php/smarty/commit/a1ccdb0518021a559b4066c37b76a42c86bbce90"],"basis":"shared function","functions":["_updateResourceDir"]}]}]}}