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 a year ago
a year 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 a year ago
pheditor/pheditor maintainer validated this vulnerability a year ago
hitisec has been awarded the disclosure bounty
The fix bounty is now up for grabs
pheditor/pheditor maintainer confirmed that a fix has been merged on 69a79e a year ago
The fix bounty has been dropped
to join this conversation