Skip to content
Path traversal Write-up Advanced

elFinder – A Case Study of Web File Manager Vulnerabilities

elFinder contained multiple vulnerabilities including path traversal, arbitrary file upload, argument injection, and a race condition that could be chained to achieve remote code execution. An unauthenticated attacker could execute arbitrary PHP code on the server.

blog.sonarsource.com

Published on blog.sonarsource.com

An application’s interaction with the file system is always highly security sensitive since minor functional bugs can easily be the source of exploitable vulnerabilities. This observation is especially true in the case of web file managers, whose role is to replicate the features of a complete file system and expose…

The author, on blog.sonarsource.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 insufficient input validation and path sanitisation in file operations, combined with a blocklist approach for dangerous file types and unsafe command construction.

What the attacker needed

No authentication required; default configuration (except race condition); for race condition: archives upload allowed and directory…

The fix

The vulnerabilities were fixed in elFinder 2.1.59 by improving path validation, changing MIME type handling for .phar files, prefixing archive names with ./ to prevent argument injection, and moving the quarantine folder outside the files directory.

How it was found

  1. Create a dummy file (e.g., a.txt) and archive it to create a.zip.
  2. Invoke the archive action with both the original file and the archive as targets, using a crafted name that injects a command.
  3. The zip command executes the injected command, writing output to a file accessible via elFinder.

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.

elFinder is a web-based file manager that lets users browse and manage files on a server. The researchers found several flaws in how it handles file paths and uploads, which could let an attacker run their own code on the server. This is serious because it means an attacker could take full control of the website.

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.