Magento 2.2.x < 2.2.8 / 2.3.x < 2.3.1 Unauthenticated SQLi

critical Nessus Plugin ID 123519

Synopsis

The remote web server is running a PHP application that is affected by a SQL injection vulnerability.

Description

The Magento application running on the remote web server is affected by a SQL injection vulnerability due to failing to properly sanitize the user-supplied 'from' and 'to' inputs to the 'prepareSqlCondition' function of the 'Magento\Framework\DB\Adapter\Pdo\Mysql' class. An unauthenticated, remote attacker can exploit this to execute arbitrary SQL statements against the back-end database, leading to the execution of arbitrary code, manipulation of data, or disclosure of sensitive information.

Solution

Apply the appropriate patch according to the vendor advisory.

See Also

http://www.nessus.org/u?706392ba

https://www.ambionics.io/blog/magento-sqli

Plugin Details

Severity: Critical

ID: 123519

File Name: magento_unauth_orm_sql_injection.nasl

Version: 1.2

Type: remote

Family: CGI abuses

Published: 3/29/2019

Updated: 4/11/2022

Configuration: Enable thorough checks

Supported Sensors: Nessus

Risk Information

CVSS Score Rationale: Based on analysis of public poc exploit.

CVSS v2

Risk Factor: High

Base Score: 7.5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS Score Source: manual

CVSS v3

Risk Factor: Critical

Base Score: 10

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

Vulnerability Information

CPE: cpe:/a:magentocommerce:magento, cpe:/a:magento:magento

Required KB Items: www/PHP, installed_sw/Magento

Exploited by Nessus: true

Patch Publication Date: 3/26/2019

Vulnerability Publication Date: 3/26/2019