CVE-2019-7139: Magento 2 Community Edition SQLi Vulnerability

magento/community-edition Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Critical
9.8

CVE-2019-7139: Magento 2 Community Edition SQLi 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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 vulnerability has been discovered in Magento 2 Community Edition that allows unauthenticated users to execute SQL statements, leading to arbitrary read access to the underlying database. This can result in sensitive data leakage and potential compromise of the system. The vulnerability affects Magento 2.1 prior to 2.1.18, Magento 2.2 prior to 2.2.9, and Magento 2.3 prior to 2.3.2.

Vulnerability Detail

The SQL injection vulnerability in Magento 2 Community Edition allows unauthenticated attackers to execute arbitrary SQL statements, enabling them to read sensitive data from the database. By crafting malicious input, an attacker can exploit this vulnerability to bypass authentication mechanisms and gain unauthorized access to the system. This can lead to the exposure of sensitive customer information, such as personal data, payment details, and order history. The vulnerability is rated as critical with a CVSS score of 9.8.

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

As a temporary workaround, it is advised to implement input validation and sanitization to prevent SQL injection attacks. Developers should carefully review and update their code to ensure that user input is properly validated and sanitized before being used in SQL queries. Additionally, implementing a web application firewall (WAF) can provide an added layer of protection against SQL injection attacks.

Conclusion

The SQL injection vulnerability in Magento 2 Community Edition poses a significant risk to online stores using affected versions. It is crucial to apply the recommended security patches or upgrade to the latest patched version to mitigate the risk of unauthorized access to the database and potential data leakage. Regularly monitoring for vulnerabilities using tools like Vulert can help ensure the security of your Magento installation. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for magento/community-edition →

Share this vulnerability

FAQ

The vulnerability allows unauthenticated attackers to execute SQL statements and gain unauthorized access to the database. This can result in the exposure of sensitive data, such as customer information and payment details.

The vulnerability affects Magento 2 Community Edition versions 2.1 to 2.1.18, 2.2 to 2.2.9, and 2.3 to 2.3.2. Online stores using these versions are at risk if they have not applied the necessary security patches.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your Magento installation is affected by this vulnerability. Simply upload your composer.lock file to the playground, and it will analyze and alert you if any vulnerabilities are found.

At the time of this report, there are no known public exploits for this vulnerability. However, it is important to apply the necessary security patches to mitigate the risk.

You can find more information about the security patches and the vulnerability in the GitHub Advisory Database. The provided source links in the 'affected' section of this report provide detailed information about the security patches for each affected version.

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