id: supabase-studio-exposure

info:
  name: Supabase Studio - Exposure
  author: theamanrawat
  severity: high
  description: |
    Supabase Studio (the official self-hosted Supabase admin dashboard) was detected exposed without authentication.
  reference:
    - https://supabase.com/docs/guides/self-hosting/docker
    - https://supabase.com/docs/guides/self-hosting#securing-your-services
  metadata:
    verified: true
    max-request: 2
    vendor: supabase
    product: supabase-studio
    shodan-query: http.html:"Supabase Studio"
    fofa-query: body="Supabase Studio"
  tags: misconfig,supabase,supabase-studio,exposure,panel,unauth

http:
  - method: GET
    path:
      - "{{BaseURL}}/project/default"

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "<title>Supabase", "Supabase Studio")'
        condition: and

  - method: GET
    path:
      - "{{BaseURL}}/api/platform/profile"

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "application/json")'
          - 'contains_all(body, "primary_email", "organizations", "projects")'
        condition: and
# digest: 490a004630440220293bed90efadbf65074b2b588d2fbd620e6f4cfbc62e58fb4825e26018921b3602201493397c070bbf7fe0c7e5687c67181a34e8a19885e9e48be86b80ea3748ad5c:922c64590222798bb761d5b6d8e72950