CVE-2021-36031 Magento Commerce Path Traversal In `theme[preview_image]` Parameter Could Lead To Remote Code Execution

High 7.2 Published Updated

An admin attacker can exploit a path traversal in the theme preview image parameter to achieve remote code execution on Magento 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-36031?

CVE-2021-36031 is a high-severity path traversal vulnerability in Adobe Magento Commerce, published on 1 Sep 2021. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

Magento Commerce versions 2.4.2 (and earlier), 2.4.2-p1 (and earlier) and 2.3.7 (and earlier) are affected by a Path Traversal vulnerability via the `theme[preview_image]` parameter. An attacker with admin privileges could leverage this vulnerability to achieve remote code execution.

Weakness: CWE-22

Which versions are affected by CVE-2021-36031?

8 open source packages ship an affected version, including magento/community-edition and magento/project-community-edition. It affects 2 products.

PackageAffectedFixed in
magento/community-edition PackagistAll versionsNone
magento/community-edition PackagistAll versionsNone
magento/community-edition PackagistAll versions2.3.7-p1
magento/community-edition PackagistAll versions2.3.7-p1
magento/community-edition PackagistFrom 2.4.2-p12.4.2-p2
magento/community-edition PackagistFrom 2.4.2-p12.4.2-p2
2 more packages
magento/project-community-edition PackagistAll versions to 2.0.2None
magento/project-community-edition PackagistAll versions to 2.0.2None

Products include Adobe Adobe Commerce, Adobe Magento Open Source.

How do I fix CVE-2021-36031?

Upgrade magento/community-edition to a fixed version for your release line: 2.3.7-p1 or 2.4.2-p2.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2021-36031 being exploited?

There is no known exploitation of CVE-2021-36031 in the wild and no public exploit code.

Sources

Also known as GHSA-7w95-qwhh-q9p3.

Is CVE-2021-36031 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free