CVE-2026-82531
published critical CVSS 4.0 · 9.2Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| smarty-php | — | smarty0 to < 4.5.8 (affected · semver) · 5.0.0 to < 5.8.5 (affected · semver) · 4.5.8 (unaffected · semver) · 5.8.5 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 9.2 / 10
- Severity
- critical
- Provider
- VulnCheck · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.1 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| smarty-php | smarty | 0 to < 4.5.8 (affected · semver)5.0.0 to < 5.8.5 (affected · semver)4.5.8 (unaffected · semver)5.8.5 (unaffected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
6- https://github.com/smarty-php/smarty/commit/1cba51cb813563eb61d963c83d28cd59f26b858d
- https://github.com/smarty-php/smarty/commit/c0fdd4824aca4f67e814b50703cfee1dfde41414
- smarty v4.5.8 Release Notes https://github.com/smarty-php/smarty/releases/tag/v4.5.8
- smarty v5.8.5 Release Notes https://github.com/smarty-php/smarty/releases/tag/v5.8.5
- GitHub Security Advisory (GHSA-3w63-v7pm-cq9x) https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x
- VulnCheck Advisory: Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache https://www.vulncheck.com/advisories/smarty-before-4.5.8-and-5-x-before-5.8.5-php-code-injection-via-extends-inheritance-cache
Provider assertions
2VulnCheck · cna
Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 2a785fd7cad4d49274d1c519792ee73dacf9e1e19301765c6d72148cbc2e6a63
- Ingested
- 06 Oct 2026, 12:57:10 UTC
- Source record
- Official CVE record