id: vercel-source-exposure

info:
  name: Vercel Source Code Exposure
  author: hlop
  severity: medium
  description: |
    The Vercel Source Code Exposure misconfiguration allows an attacker to access sensitive source code files on the Vercel platform.
  reference:
    - https://vercel.com/docs/projects/overview#logs-and-source-protection
  metadata:
    max-request: 1
    fofa-query: cname_domain="vercel.app" || icon_hash="-2070047203"
  tags: vercel,exposure,misconfig

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

    redirects: true
    max-redirects: 3

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Deployment Source</title>"
          - "Deployment Source – Dashboard – Vercel"
        condition: or

      - type: word
        part: body
        words:
          - "<title>Login – Vercel</title>"
        negative: true
# digest: 490a0046304402207b479e6afd6eeb961440df48a25056659d409e1ad58cc50025935558239a783402202aee8ed85fce874eba3b2aac9c5795d4f2ef47534c431a338cbaf9bc11e9c4e4:922c64590222798bb761d5b6d8e72950