---
id: CVE-2026-62996
title: >-
  Smarty is a template engine for PHP, facilitating the separation of
  presentation (HTML/CSS) from application logic
summary: >-
  Smarty is a template engine for PHP, facilitating the separation of
  presentation (HTML/CSS) from application logic. From 5.0.0 until 5.8.4,
  Smarty's stream: resource-name handling does not adequately restrict which PHP
  stream wrappers an…
severity: medium
cwe:
  - CWE-22
vendor: smarty
product: smarty/smarty
affected:
  - 'smarty/smarty >= 5.0.0, < 5.8.4'
patched:
  - smarty/smarty 5.8.4
published: '2026-08-07'
updated: '2026-09-09'
sourceUpdated: '2026-09-09T21:02:22.660'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-62996'
references:
  - url: >-
      https://github.com/smarty-php/smarty/commit/3c9f77a2e06ce319ae0092496af32cc8f3adc52e
    label: security-advisories@github.com
  - url: 'https://github.com/smarty-php/smarty/pull/1195'
    label: security-advisories@github.com
  - url: 'https://github.com/smarty-php/smarty/releases/tag/v5.8.4'
    label: security-advisories@github.com
  - url: >-
      https://github.com/smarty-php/smarty/security/advisories/GHSA-rjhh-76wf-8xmw
    label: security-advisories@github.com
  - url: >-
      https://github.com/smarty-php/smarty/security/advisories/GHSA-rjhh-76wf-8xmw
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: 'https://github.com/advisories/GHSA-rjhh-76wf-8xmw'
tags:
  - nvd
  - ghsa
  - composer
epss: 0.00508
epssPercentile: 0.40794
aliases:
  - GHSA-rjhh-76wf-8xmw
ecosystem: composer
ingestedAt: '2026-08-07T15:14:28.841Z'
---

## Overview

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. From 5.0.0 until 5.8.4, Smarty's stream: resource-name handling does not adequately restrict which PHP stream wrappers and filter chains can be referenced from a template, allowing a php://filter-wrapped resource name to be used to read the contents of arbitrary local files accessible to the PHP process. An attacker able to author or influence a template's resource reference could exploit this to disclose sensitive file contents outside the intended template/config scope. This issue is fixed in version 5.8.4.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-62996)

Affected packages:

- `smarty/smarty >= 5.0.0, < 5.8.4`

Patched in:

- `smarty/smarty 5.8.4`

Source: https://github.com/advisories/GHSA-rjhh-76wf-8xmw
