CVE-2022-21648: Sandbox bypass in Latte templates
8.2
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.53703%
CWE
Published
1/6/2022
Updated
2/3/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
latte/latte | composer | >= 2.10.0, < 2.10.8 | 2.10.8 |
latte/latte | composer | >= 2.9.0, < 2.9.6 | 2.9.6 |
latte/latte | composer | >= 2.8.0, < 2.8.8 | 2.8.8 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The commit diff shows a security patch in PhpWriter.php that adds validation to block complex expressions (e.g., {$var}
) in strings when the sandbox is enabled. The absence of this check in vulnerable versions allowed untrusted templates to execute arbitrary code. The tests added in the commit explicitly verify this scenario, confirming the function's role in the vulnerability. The CWE-79 classification and advisory descriptions further corroborate that improper input neutralization in template processing was the root cause.