CVE-2021-3291: Zen Cart vulnerable to authenticated remote code execution
7.2
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.97081%
CWE
Published
5/24/2022
Updated
7/7/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| zencart/zencart | composer | <= 1.5.7b | 1.5.7c |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from an eval() call that directly executes configuration values from admin input. The unpatched code (line 334) used raw $value['value'] in an eval context, while the patch adds zen_output_string sanitization. This matches the CWE-78 pattern where unsanitized user input flows into OS command execution via eval(), which can execute arbitrary PHP code including system() calls. The exploit POC demonstrates manipulating radio input values to inject OS commands through this eval pathway.