id: mailpit-app-info-disclosure

info:
  name: Mailpit App - Information Disclosure
  author: DhiyaneshDK
  severity: medium
  description: |
    Mailpit exposes the /api/v1/messages endpoint which can leak email metadata or full email content without authentication, leading to information disclosure.
  reference:
    - https://github.com/axllent/mailpit
    - https://mailpit.axllent.org/docs/api/
  metadata:
    verified: true
    max-request: 1
    shodan-query: title:"Mailpit"
  tags: mailpit,exposure,disclosure,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/api/v1/messages"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"messages":'
          - '"ID":'
        condition: and

      - type: word
        part: content_type
        words:
          - 'application/json'

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