CVE-2021-36036 Magento Commerce Media Gallery Upload Improper Access Control Could Lead To Remote Code Execution
An authenticated admin can delete .htaccess files via Media Gallery, enabling remote code execution in Adobe Commerce.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-36036?
CVE-2021-36036 is a high-severity missing authorization vulnerability in Magento Magento, published on 6 Sep 2023. An attacker needs administrator access to exploit it, with no action from the victim.
Official description
Magento versions 2.4.2 (and earlier), 2.4.2-p1 (and earlier) and 2.3.7 (and earlier) are affected by an improper access control vulnerability within Magento's Media Gallery Upload workflow. By storing a specially crafted file in the website gallery, an authenticated attacker with administrative privilege can gain access to delete the .htaccess file. This could result in the attacker achieving remote code execution.
Weakness: CWE-284
Which versions are affected by CVE-2021-36036?
9 open source packages ship an affected version, including magento/community-edition, magento and magento/project-community-edition. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
magento/community-edition Packagist | All versions | None |
magento/community-edition Packagist | All versions | None |
magento/community-edition Packagist | All versions | 2.3.7-p1 |
magento/community-edition Packagist | All versions | 2.3.7-p1 |
magento/community-edition Packagist | From 2.4.2-p1 | 2.4.2-p2 |
magento/community-edition Packagist | From 2.4.2-p1 | 2.4.2-p2 |
3 more packages
magento Bitnami | All versions | 2.3.7, 2.4.2 |
magento/project-community-edition Packagist | All versions to 2.0.2 | None |
magento/project-community-edition Packagist | All versions to 2.0.2 | None |
Products include Magento Magento.
How do I fix CVE-2021-36036?
Upgrade magento/community-edition to a fixed version for your release line: 2.3.7-p1 or 2.4.2-p2.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2021-36036 being exploited?
There is no known exploitation of CVE-2021-36036 in the wild and no public exploit code.
Other vulnerabilities in Magento Magento
Sources
Also known as BIT-magento-2021-36036, GHSA-wqr6-wv6c-p8fx.