Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. magento/community-edition
  4. ›
  5. CVE-2021-21016

CVE-2021-21016: Magento OS command injection via the WebAPI

May 24, 2022 (updated February 10, 2025)

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

  • github.com/advisories/GHSA-792f-c8mp-2cr5
  • github.com/magento/magento2
  • github.com/magento/magento2/commit/a2eb7e29ea92a8bbc86c3b6b81b59d8533088497
  • github.com/magento/magento2/commit/a349e022c9ae070e7da262021f9ef182105aa00b
  • helpx.adobe.com/security/products/magento/apsb21-08.html
  • nvd.nist.gov/vuln/detail/CVE-2021-21016

Code Behaviors & Features

Detect and mitigate CVE-2021-21016 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.3.6-p1, all versions starting from 2.4.0 before 2.4.2

Fixed versions

  • 2.3.6-p1
  • 2.4.2

Solution

Upgrade to versions 2.3.6-p1, 2.4.2 or above.

Impact 9.1 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

packagist/magento/community-edition/CVE-2021-21016.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:40 +0000.