Path Traversal / Arbitrary File Write
The applicationName parameter in the application creation endpoint was vulnerable to path traversal, allowing an attacker to write an uploaded file to any directory, such as system32. This could lead to code execution as SYSTEM by placing a file that is later loaded by a service.
labs.jumpsec.com
Published on labs.jumpsec.com
This is the second post in our two part series on ManageEngine Desktop Central. All of the reported issues have since been acknowledged and resolved by ManageEngine.
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 applicationName parameter was used to construct a file path without proper sanitisation, allowing directory traversal.
Impact
An attacker could write arbitrary files to the system with SYSTEM privileges, potentially leading to code execution at service start time.
What the attacker needed
Access to application creation functionality; some level of privilege already obtained
The fix
The vendor fixed the issue in the most recent version.
How it was found
- Upload a file to the /emsapi/files endpoint, which returns a fileID.
- Create a new application via the /emsapi/osdeployer/applications endpoint, using a traversed applicationName to target a system directory.
- The uploaded file is written to the targeted directory with SYSTEM privileges.
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.
Path traversal is a way to trick a program into using a file path that goes outside the intended folder, like using '../' to move up directories. Here, the application name was used to build a folder path, so an attacker could set the name to point to a system folder and write a malicious file there. That file could then be run by the system with high privileges.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.