Skip to content
Path traversal Write-up Beginner

ONLYOFFICE Document server: Path Traversal

The fileExt parameter in the /example/editor endpoint was not sanitised, allowing path traversal to copy arbitrary files into a web-accessible directory. An attacker could then download sensitive files such as /etc/passwd or configuration files containing credentials, and could also cause a denial of service by copying /dev/urandom.

medium.com

Published on medium.com

OnlyOffice (formerly TeamLab), stylized as ONLYOFFICE, is a free software office suite and ecosystem of collaborative applications. It consists of online editors for text documents, spreadsheets, presentations, forms and PDFs, and the room-based collaborative platform.

Vahagn Abazyan, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the fileExt parameter was not properly sanitised or validated before being used in a file copy operation, allowing directory traversal sequences.

Impact

An attacker could read sensitive system and configuration files, potentially leading to data breaches and privilege escalation, and could cause a denial of service by copying /dev/urandom to fill disk space.

What the attacker needed

Network access to the /example/editor endpoint; no authentication required

The fix

The vulnerability was fixed in commits released on February 26, 2024; users should update to the latest version and restrict access to the affected endpoint.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A path traversal bug lets someone use '..' in a file path to escape the intended folder and reach other files on the server. Here, a parameter meant to check a file extension was used to copy any file into a public folder, which the attacker could then download. This exposed system files and configuration secrets, and could even crash the server.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.