The Travelogue
A relative path traversal vulnerability in Citrix ShareFile Storage Zones Controller allowed unauthenticated attackers to write files to arbitrary locations within the web root, leading to remote code execution by overwriting a Razor view file.
Published on codewhitesec.blogspot.com
Citrix ShareFile Storage Zones Controller uses a fork of the third party library NeatUpload. Versions before 5.11.20 are affected by a relative path traversal vulnerability (CTX328123/CVE-2021-22941) when processing upload requests.
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
The PostBackID value from a query string parameter was used directly in a file path without validation, allowing path traversal.
What the attacker needed
Unauthenticated access to the web interface; ability to send HTTP requests
How it was found
- Send a multipart POST request to a path containing 'upload' and '.aspx' with a part having name and filename attributes.
- Include query parameters 'id' (or 'uploadid'), 'bp', and 'accountid' with arbitrary values.
- Ensure the multipart part is larger than 4096 bytes to trigger the file write.
- Set the 'id' parameter to a path traversal sequence to write a file outside the intended directory.
- Overwrite an existing Razor view file (e.g., Error.cshtml) with malicious content using allowed characters.
- Access the overwritten view via its corresponding URL to execute code.
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.
The software allowed attackers to control where uploaded files were saved, letting them write files outside the intended folder. By overwriting a web page template, they could run their own code on 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.