Quick answers
- Is CVE-2026-82531 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-82531 being exploited in the wild.
- How severe is CVE-2026-82531?
- High severity, with a CVSS score of 8.1, published 6 October 2026.
- Which products and versions are affected?
- Smarty before 4.5.8 and 5.x before 5.8.5.
- Is there a fix for CVE-2026-82531?
- Yes: fixed in Smarty 4.5.8, 5.8.5. Until then: <UNKNOWN> Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-82531 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-82531?
- Check whether you run Smarty at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- Fixed in: Smarty 4.5.8, 5.8.5
<UNKNOWN>
Technical details
The vulnerability is a code injection (CWE-94) in Smarty's template inheritance via extends: path. When a template is rendered through extends:/inheritance, the top-level unifunc's nocache_hash is never restored and remains null, causing the cache-split regex to produce an empty alternative "(realhash|)" in Smarty_Internal_Runtime_UpdateCache. This allows attacker-controlled template output to forge a /*%%SmartyNocache:%%*/ marker that gets copied verbatim into the generated PHP cache file as raw PHP code, executing on next include(). The attack requires template inheritance and assignment of attacker-controlled data.
Affected products
- Smarty Smarty before 4.5.8 and 5.x before 5.8.5
Timeline
- 2026-10-06: disclosed
- 2026-10-04: patched