Magento 2 Community Edition XSS Vulnerability

magento/community-edition Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
5.4

CVE-2019-7945: Magento 2 Community Edition XSS Vulnerability. Affects magento/community-edition across 3 version ranges.

>= 2.1.0, < 2.1.18 >= 2.2.0, < 2.2.9 >= 2.3.0, < 2.3.2

Fixed in 2.1.18, 2.2.9 or 2.3.2, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Magento 2 Community Edition is an open-source e-commerce platform that provides a wide range of features for online stores. It is widely used for its flexibility, scalability, and extensive customization options. However, a stored cross-site scripting (XSS) vulnerability has been discovered in Magento Open Source versions prior to 1.9.4.2, Magento Commerce versions prior to 1.14.4.2, Magento 2.1 versions prior to 2.1.18, Magento 2.2 versions prior to 2.2.9, and Magento 2.3 versions prior to 2.3.2. This vulnerability allows an authenticated user with privileges to modify currency symbols to inject malicious JavaScript code.

Vulnerability Detail

The stored XSS vulnerability in Magento 2 Community Edition allows an attacker to inject malicious JavaScript code into the application. This can be done by exploiting the ability to modify currency symbols, which is a privilege granted to authenticated users. Once the code is injected, it can be executed in the context of other users visiting the affected pages, potentially leading to various attacks such as session hijacking, defacement, or theft of sensitive information. The vulnerability has a CVSS score of 5.4, indicating a moderate severity level.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.1.0, < 2.1.18 2.1.18
    composer require magento/community-edition:2.1.18
  • >= 2.2.0, < 2.2.9 2.2.9
    composer require magento/community-edition:2.2.9
  • >= 2.3.0, < 2.3.2 2.3.2
    composer require magento/community-edition:2.3.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to apply the official patches or update to the latest version of Magento as soon as possible.

Conclusion

The XSS vulnerability in Magento 2 Community Edition poses a moderate risk to affected installations. It is crucial to update to the latest version or apply the official patches to mitigate the risk. Following secure coding practices and input validation is also recommended to prevent similar vulnerabilities in the future. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for magento/community-edition →

Share this vulnerability

FAQ

The vulnerability allows an attacker to execute arbitrary JavaScript code in the context of other users, potentially leading to various attacks such as session hijacking, defacement, or theft of sensitive information.

Magento Open Source versions prior to 1.9.4.2, Magento Commerce versions prior to 1.14.4.2, Magento 2.1 versions prior to 2.1.18, Magento 2.2 versions prior to 2.2.9, and Magento 2.3 versions prior to 2.3.2 are affected by this vulnerability.

Yes, patches are available for the affected versions of Magento. It is recommended to update to the latest version or apply the official patches.

There are no known public exploits for this vulnerability at the time of writing. However, it is important to apply the necessary updates or patches to mitigate the risk.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your composer.lock file and it will provide real-time alerts for open-source vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for magento/community-edition.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 2.1.0, < 2.1.18 2.1.18
    composer require magento/community-edition:2.1.18
  • >= 2.2.0, < 2.2.9 2.2.9
    composer require magento/community-edition:2.2.9
  • >= 2.3.0, < 2.3.2 2.3.2
    composer require magento/community-edition:2.3.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback