Path Traversal in pheditor/pheditor


Reported on

Sep 14th 2021


A path traversal attack (also known as directory traversal) aims to access files and directories that are stored outside the web root folder. By manipulating variables that reference files with “dot-dot-slash (../)” sequences and its variations or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system including application source code or configuration and critical system files. is vulnerable to path traversal as shown below:

Proof of Concept

Variable: $_GET['path']

if (isset($_GET['path'])) {
    header('Content-Type: application/json');

    $dir = rtrim(MAIN_DIR . DS . trim($_GET['path'], '/'), '/');

Login to pheditor
Visit the following link in a browser:


This will list all files on /etc/


In some cases, an attacker might be able to write to arbitrary files on the server, allowing them to modify application data or behavior, and ultimately take full control of the server.

We created a GitHub Issue asking the maintainers to create a 2 years ago
2 years ago


Hey hitisec, I've emailed the maintainers for you.

We have contacted a member of the pheditor team and are waiting to hear back 2 years ago
pheditor/pheditor maintainer validated this vulnerability 2 years ago
hitisec has been awarded the disclosure bounty
The fix bounty is now up for grabs
pheditor/pheditor maintainer marked this as fixed with commit 69a79e 2 years ago
The fix bounty has been dropped
This vulnerability will not receive a CVE
to join this conversation