sendmail-forward-exposure: Sendmail .forward File - Exposure

2026-01-24 Sendmail PoC Public

Description

Sendmail .forward file is publicly accessible. This file is used to configure email forwarding and can expose sensitive information including email addresses, forwarding rules, and potentially executable commands (pipe to programs).

PoC

id: sendmail-forward-exposure

info:
  name: Sendmail .forward File - Exposure
  author: ritikchaddha
  severity: low
  description: |
    Sendmail .forward file is publicly accessible. This file is used to configure email forwarding and can expose sensitive information including email addresses, forwarding rules, and potentially executable commands (pipe to programs).
  reference:
    - https://www.sendmail.org/~ca/email/doc8.12/op-sh-4.html
    - https://linux.die.net/man/5/forward
  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:
    max-request: 4
    verified: true
  tags: exposure,sendmail,config,mail,mta,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/.forward"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"'
          - "\\|[\\s]*/[a-zA-Z0-9/_.-]+"
          - ":include:[\\s]*/[a-zA-Z0-9/_.-]+"
          - "^/[a-zA-Z0-9/_.-]+/[a-zA-Z0-9/_.-]+$"
        condition: or

      - type: word
        part: content_type
        words:
          - "text/plain"

      - type: status
        status:
          - 200

      - type: word
        part: body
        words:
          - "<html"
          - "<!DOCTYPE"
          - "<HTML"
        negative: true
# digest: 4b0a00483046022100dddf6cc6a617f95fbdf5f54b1e0c8fbef4b60f2e6ee5dcca41d7e90932741048022100be2943199cda431a799efcc3f99332879b81dfde153b9687b61ae0c43752af9d:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities