Magento OS command injection via the WebAPI
Impact
Magento versions 2.4.1 (and earlier), 2.4.0-p1 (and earlier) and 2.3.6 (and earlier) are vulnerable to OS command injection via the WebAPI. Successful exploitation could lead to remote code execution by an authenticated attacker. Access to the admin console is required for successful exploitation.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| Earlier releases before 2.3.6-p1Ecosystem versions | 2.3.6-p1 |
| From 2.4.0 before 2.4.2Ecosystem versions | 2.4.2 |
Version evidence: OSV · GHSA-792f-c8mp-2cr5
View original version evidence (124 explicit versions)
| Affected range | Recorded fix |
|---|---|
| Earlier releases through 2.0.2 (inclusive)Ecosystem versions | Not recorded |
Version evidence: OSV · GHSA-792f-c8mp-2cr5
View original version evidence (53 explicit versions)
Original source description
Magento versions 2.4.1 (and earlier), 2.4.0-p1 (and earlier) and 2.3.6 (and earlier) are vulnerable to OS command injection via the WebAPI. Successful exploitation could lead to remote code execution by an authenticated attacker. Access to the admin console is required for successful exploitation.
References
- Security advisory nvd.nist.gov/vuln/detail/CVE-2021-21016
- Patch github.com/magento/magento2/commit/a2eb7e29ea92a8bbc86c3b6b81b59d8533088497
- Patch github.com/magento/magento2/commit/a349e022c9ae070e7da262021f9ef182105aa00b
- Source reference github.com/magento/magento2
- Security advisory helpx.adobe.com/security/products/magento/apsb21-08.html