Skip to content
CVE PROGRAM SOURCE RECORD9.2 Critical

CVE-2026-82531

Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache

Description

Smarty before 4.5.8 and 5.x before 5.8.5 contains a code injection vulnerability where the top-level nocache_hash is never restored during extends:/multi-component template inheritance, leaving it null. Attackers can supply assigned data containing a forged SmartyNocache marker that is copied verbatim into the regenerated PHP cache file, executing arbitrary PHP on include for remote code execution.

Affected products

Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.

smarty-php smarty

Default version status: unaffected

  • 0 to < 4.5.8affected
  • 5.0.0 to < 5.8.5affected
  • 4.5.8unaffected
  • 5.8.5unaffected
pkg:composer/smarty/smarty

References