Skip to main content

CVE-2021-36036 — Vulnerability in magento/community-edition

CRITICAL

Magento improper access control vulnerability within Magento's Media Gallery Upload workflow

Published September 6, 2023Updated November 6, 2025Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (2.05%). Schedule for your next planned update.

Does your project use an affected magento/community-edition version?

Paste your composer.lock to check it for CVE-2021-36036 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my composer.lock

Summary

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.

Advisory Timeline

  • First published September 6, 2023 (1177 days ago).
  • Last revised November 6, 2025 — 792 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update magento/community-edition to 2.3.7-p1 or later
composer require "magento/community-edition:^2.3.7-p1"
Composer
Update magento/community-edition to 2.4.2-p2 or later
composer require "magento/community-edition:^2.4.2-p2"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (5)

Affects 1 ecosystem: Packagist (2).

PackageFixed In
magento/community-edition Packagist · Affected: 2.3.7No fix available
magento/community-edition Packagist · Affected: 2.4.2No fix available
magento/project-community-edition Packagist · Affected: 0.1.0-alpha100, 0.1.0-alpha101, 0.1.0-alpha102, 0.1.0-alpha103 (+49 more)Range-based data available
magento/community-edition Packagist · Affected: 0.1.0-alpha100, 0.1.0-alpha101, 0.1.0-alpha102, 0.1.0-alpha103 (+118 more)2.3.7-p1
magento/community-edition Packagist · Affected: 2.4.2-p12.4.2-p2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

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

Frequently Asked Questions

What is CVE-2021-36036?
Magento improper access control vulnerability within Magento's Media Gallery Upload workflow. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2021-36036?
CVE-2021-36036 affects magento/community-edition and magento/project-community-edition. It has a 2.1% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2021-36036 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
2.05%
EPSS percentile: 81.9

This places it in the top quartile of EPSS-scored vulnerabilities — 81.9% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.

Also Known As

GHSA-wqr6-wv6c-p8fx
BIT-magento-2021-36036

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock