| Name | CVE-2026-82531 |
| 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. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
| Debian Bugs | 1150192 |
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| smarty3 (PTS) | bookworm, bookworm (security) | 3.1.47-2+deb12u1 | vulnerable |
| forky, sid, trixie | 3.1.48-2 | vulnerable | |
| smarty4 (PTS) | bookworm, bookworm (security) | 4.3.0-1+deb12u2 | vulnerable |
| forky, sid, trixie | 4.5.5-1 | vulnerable |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| smarty3 | source | (unstable) | (unfixed) | |||
| smarty4 | source | (unstable) | (unfixed) | 1150192 |
[trixie] - smarty4 <no-dsa> (Minor issue)
[bookworm] - smarty4 <postponed> (minor issue)
[trixie] - smarty3 <no-dsa> (Minor issue)
[bookworm] - smarty3 <postponed> (minor issue)
https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x
Fixed by: https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d (v4.5.8)