id: flask-debug-toolbar

info:
  name: Flask Debug Toolbar - Exposure
  author: 0x_Akoko
  severity: medium
  description: |
    Detected Flask Debug Toolbar was exposed in production, potentially leaking sensitive application information, SQL queries, request data, and configuration details.
  reference:
    - https://flask-debugtoolbar.readthedocs.io/
    - https://github.com/flask-debugtoolbar/flask-debugtoolbar
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cwe-id: CWE-200
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.html:"flDebugToolbar"
    fofa-query: body="flDebugToolbar"
  tags: flask,python,debug,toolbar,exposure,misconfig

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "flDebugToolbar"
          - "flDebugPanelList"
        condition: or

      - type: word
        part: body
        words:
          - "/_debug_toolbar/"
          - "flDebugVersionPanel"
          - "DEBUG_TOOLBAR_STATIC_PATH"
        condition: or

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100b238a1ef069b75fe3f2cfbf94c663dca9d161a444390226edd3ae1294263077d02205c6d73f0eb058704cfaa234ccfc3e826f54f2c30f2e72360f6dc8d48d4707644:922c64590222798bb761d5b6d8e72950