All vulnerabilities

Servers and applications

CVE-2026-62996

Smarty Security stream restriction bypass through stream: resource

Severity
Medium
Published
20 Jul 2026
Last changed
20 Jul 2026
Added to UpHeron
3 Nov 2026
Fixed in
5.8.4
Exploit chance
0.5% in the next 30 daysHigher than 44% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Path traversal (CWE-22)
Also known as
GHSA-rjhh-76wf-8xmw
Sources
Project advisories (GitHub)

Description

smarty/smarty version 5.8.0 can read local files through PHP stream wrappers even when Smarty Security is enabled and all streams are disabled with Security::$streams = null.

The bypass uses Smarty's built-in stream: resource type. A template such as:

is handled as Smarty resource type stream, so the security check that would normally reject the underlying php wrapper is not applied. StreamPlugin then opens the nested php://filter/... URI directly.

For comparison, the direct resource:

is blocked with stream 'php' not allowed by security setting.

Affected package:

  • Ecosystem: Packagist / Composer
  • Package: smarty/smarty
  • Confirmed affected version: 5.8.0
  • Confirmed source reference from Composer lock: 78d259d3b971c59a0cd719c270cc5cbb740c36a7
  • Current stable version on Packagist at review time: v5.8.0
  • Packagist usage at review time: 41,113,855 total downloads and 840,604 monthly downloads

Relevant code paths:

From smarty-php/smarty's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
SmartyServers and applications · github:smarty-php/smarty
  • From 5.0.0 before 5.8.4

About Smarty

Web template system in PHP

From Wikidata, CC0 1.0.
Monthly downloads (Packagist)
1,171,375Packagist, 15 Nov 2026
Total downloads (Packagist)
46,435,268Packagist, 15 Nov 2026
GitHub stars
2,351GitHub, 15 Nov 2026
Forks
703GitHub, 15 Nov 2026
Latest release
v5.8.5GitHub, 15 Nov 2026
Released
4 Oct 2026GitHub
License
GNU Lesser General Public LicenseWikidata
Written in
PHPWikidata
First released
2001Wikidata
First published on GitHub
30 Oct 2014GitHub

References