Skip to main content

Smarty CVE-2026-62993

| EUVDEUVD-2026-68814 MEDIUM
Server-Side Request Forgery (SSRF) (CWE-918)
2026-08-31 GitHub_M GHSA-cq55-c7wv-pxmq
6.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply trusted-host URL with open redirect param
  2. Delivery
    Pass isTrustedUri() allowlist check
  3. Exploit
    file_get_contents() follows HTTP redirect
  4. Execution
    Redirect resolves to internal endpoint
  5. Persist
    Server fetches internal resource
  6. Impact
    Attacker receives internal data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Three conditions must all be satisfied simultaneously: (1) Smarty's security policy must be active - the redirect-following bug is only reachable in the code path that checks isTrustedUri(), which is invoked only when $template->smarty->security_policy is set; applications that do not enable a Smarty security policy are not affected by this specific bypass but may have broader template injection exposure. (2) The attacker must be able to supply or influence the URL argument passed to the {fetch} tag - this requires that user-controlled input reaches template rendering with an attacker-influenced fetch target, a configuration that is itself a design risk. (3) At least one host in the trusted_uri allowlist must host an exploitable open redirect - without this, the initial isTrustedUri() check blocks the malicious destination directly. The CVSS 4.0 AT:P metric captures requirement (3). Exploitation is limited to the 4.x and 5.x lines prior to the patched versions; no exploitation path exists against the subsequent-system scope without reachable internal services.

Impact

The CVSS 4.0 score of 6.9 (Medium) accurately reflects the chained-exploit nature of this vulnerability. The AT:P (Attack Requirements: Present) metric captures the critical prerequisite: an open redirect must independently exist on one of the trusted_uri hosts, making this a two-vulnerability chain rather than a standalone issue. The SC:H (Subsequent System Confidentiality: High) impact metric is appropriate because successful SSRF can expose sensitive internal services - cloud instance metadata (AWS IMDSv1, GCP metadata), internal APIs, or private network services - to the attacker. The VC:N/VI:N/VA:N metrics correctly reflect that the Smarty application server itself is not directly compromised. Real-world priority is moderate: exploitation requires (1) attacker influence over {fetch} target URLs, (2) an open redirect on a trusted domain, and (3) reachable internal services from the server. Environments using Smarty with a strict security policy AND having no open redirects on trusted hosts are not exploitable. EPSS data is not present in the provided intelligence; no KEV listing and no POC code are available, further supporting a non-urgent but genuine remediation priority for affected deployments.

Exploit ScenarioDerived

An attacker identifies that a PHP application uses Smarty with a security policy allowing fetch requests to https://trusted-partner.example.com and discovers an open redirect at https://trusted-partner.example.com/redirect?url=. The attacker submits a template or request parameter that causes {fetch} to request https://trusted-partner.example.com/redirect?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/, passing the isTrustedUri() check; file_get_contents() then silently follows the redirect to the AWS instance metadata service, returning IAM credential data that the attacker can exfiltrate. No public proof-of-concept code exists for this specific CVE, but the technique is a well-understood SSRF pattern requiring no special tooling beyond HTTP request construction.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 31, 2026

Server-side request forgery in Smarty's {fetch} template function (versions prior to 4.5.7 on the 4.x line and 5.8.2 on the 5.x line) allows network-accessible attackers to bypass the trusted_uri allowlist and reach arbitrary internal endpoints by exploiting PHP's default redirect-following behavior. The security policy's isTrustedUri() check validates only the initial URL; when file_get_contents() silently follows an HTTP redirect placed on a trusted host, the request lands on an attacker-chosen internal target, enabling SSRF to services such as cloud metadata endpoints or internal APIs. No public exploit has been identified at time of analysis, and the vulnerability is not listed in the CISA KEV catalog.

RemediationAI

Upgrade Smarty to version 4.5.7 (4.x line) or 5.8.2 (5.x line); these are the vendor-released patched versions confirmed by GitHub tagged releases at https://github.com/smarty-php/smarty/releases/tag/v4.5.7 and https://github.com/smarty-php/smarty/releases/tag/v5.8.2. If immediate upgrade is not possible, the following compensating controls reduce risk: disable or restrict use of the {fetch} template tag entirely by removing it from the allowed function list in the Smarty security policy - this eliminates the attack surface at the cost of losing remote content fetching capability in templates. Alternatively, audit and remediate any open redirects on all hosts listed in trusted_uri, as the attack chain requires a working open redirect on a trusted host; eliminating that prerequisite prevents exploitation even without patching. Restricting outbound HTTP from the PHP application server to explicitly whitelisted IPs (network egress filtering) limits the SSRF blast radius even if the vulnerability is triggered. The security advisory is at https://github.com/smarty-php/smarty/security/advisories/GHSA-cq55-c7wv-pxmq.

Affected VersionsENISA

smarty 5.0.0, < 5.8.2
smarty < 4.5.7

Affected Packages

composer smarty/smarty fix: 4.5.7, 5.8.2
euvd smarty fix: 4.5.7, 5.8.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Smarty (cpe:2.3:a:smarty-php:smarty) is a PHP template engine that separates presentation from application logic. Its {fetch} plugin - implemented in libs/plugins/function.fetch.php (4.x) and src/FunctionHandler/Fetch.php (5.x) - fetches remote content using PHP's file_get_contents(). When a Smarty security policy is active, Security::isTrustedUri() validates the initial fetch URL against a trusted_uri allowlist (CWE-918). However, PHP's file_get_contents() follows HTTP redirects by default via its internal follow_location stream handling, meaning the validation occurs before the redirect chain resolves. An attacker who can influence the fetch target can provide a URL pointing to a trusted host that hosts an open redirect, causing the server-side HTTP client to be transparently forwarded to an attacker-chosen internal resource. The fix (PR #1194) introduces a stream context with follow_location => 0 and max_redirects => 1 whenever a security policy is in effect, preventing redirect-following entirely for remote fetches under policy.

Know when Smarty gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 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
vuln.today AI 6.8 MEDIUM

Attack requires open redirect on trusted host (AC:H); SSRF reads subsequent-system internal resources with high confidentiality impact (S:C, C:H); no integrity or availability impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N
Red Hat 8.6 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 31, 2026 - 22:18 EUVD
CVE Published
Aug 31, 2026 - 20:58 cve.org
MEDIUM 6.9

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.4%
Top 65% exploitable
Prevalence
High
widely used PHP template engine across legacy and modern PHP applications
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

More in Smarty

View all
CVE-2014-8350 HIGH POC
7.5 Nov 03

Smarty before 3.1.21 allows remote attackers to bypass the secure mode restrictions and execute arbitrary PHP code as de

CVE-2018-13982 HIGH POC
7.5 Sep 18

Smarty_Security::isTrustedResourceDir() in Smarty before 3.1.33 is prone to a path traversal vulnerability due to insuff

CVE-2026-62996 MEDIUM POC
6.9 Aug 07

Smarty PHP template engine versions 5.0.0 through 5.8.3 expose a security policy bypass allowing file disclosure via the

CVE-2018-16831 MEDIUM POC
5.9 Sep 11

Smarty before 3.1.33-dev-4 allows attackers to bypass the trusted_dir protection mechanism via a file:./../ substring in

CVE-2021-26120 CRITICAL
9.8 Feb 22

Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring. Rated crit

CVE-2026-82531 CRITICAL
9.2 Oct 06

PHP code injection in the Smarty templating engine allows remote code execution in applications running Smarty 4.x befor

CVE-2022-29221 HIGH
8.8 May 24

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Rate

CVE-2012-4277 MEDIUM POC
4.3 Aug 13

Cross-site scripting (XSS) vulnerability in the smarty_function_html_options_optoutput function in distribution/libs/plu

CVE-2021-26119 HIGH
7.5 Feb 22

Smarty before 3.1.39 allows a Sandbox Escape because $smarty.template_object can be accessed in sandbox mode. Rated high

CVE-2026-62992 MEDIUM
6.9 Aug 07

Symlink-based path traversal in Smarty's Security::_checkDir() allows an attacker who can place a symbolic link inside a

CVE-2023-28447 MEDIUM
6.1 Mar 28

Smarty is a template engine for PHP. Rated medium severity (CVSS 6.1), this vulnerability is remotely exploitable, no au

CVE-2023-41661 MEDIUM
4.8 Sep 29

Auth. Rated medium severity (CVSS 4.8), this vulnerability is remotely exploitable, low attack complexity. No vendor pat

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy