Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

smarty-php/smarty
master @ 17fae11
6
Fixes
31
CVEs
CRITICAL
Peak severity
0.0%
Coverage
Highlights
Auth Bypass: 1 prior fix. Scrutinize any change in this area.
src/Compile/Tag/ExtendsTag.php: most-fixed (1 issue). Treat as high-risk during review.
5 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Code Injection: Poorly escaped template names in 'extends' or 'include' tags allow attackers to inject arbitrary PHP code during compilation, leading to remote code execution. This is a recurring vector represented historically in CVE-2024-35226 and CVE-2022-29221.
Auth Bypass: The template compiler security policy failed to normalize tag casing prior to validation, allowing mixed-case or uppercase tags to completely bypass 'isTrustedTag' checks. This allows template authors to invoke disallowed functions or blocks.
Path Traversal: Path traversal occurs when secure directory restrictions in the template engine (such as trusted_dir) are bypassed via symlinks or incomplete canonicalization, allowing attackers to read sensitive local files.