CVE-2026-82531 PUBLISHED

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

Assigner: VulnCheck
Reserved: 29.08.2026 Published: 06.10.2026 Updated: 06.10.2026

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.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS Score: 9.2

Product Status

Vendor smarty-php
Product smarty
Versions Default: unaffected
  • affected from 0 to 4.5.8 (excl.)
  • affected from 5.0.0 to 5.8.5 (excl.)
  • Version 4.5.8 is unaffected
  • Version 5.8.5 is unaffected

Credits

  • MegaManSec reporter

References

Problem Types

  • Improper Control of Generation of Code ('Code Injection') CWE