CVE-2021-21018: Magento OS Command Injection
9.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.91687%
CWE
Published
5/24/2022
Updated
1/10/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| magento/community-edition | composer | < 2.3.6 | 2.3.6 |
| magento/community-edition | composer | >= 2.4.0, < 2.4.1-p1 | 2.4.1-p1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability exists in the scheduled operation module (cron), which is handled by Magento's Cron module. The execute method in Schedule.php is responsible for running cron jobs. The advisory indicates OS command injection via cron configurations, implying user-supplied data (like command parameters) was used unsafely in system commands. This function likely constructs OS commands using admin-controlled input without proper sanitization, leading to arbitrary code execution when malicious commands are injected. The confidence is high because this aligns with CWE-78 patterns and Magento's cron execution flow.