Authenticated path traversal to RCE
An authenticated user with page editing rights could upload a PNG file containing PHP code and then use a path traversal in the bFilename parameter to include that file, leading to remote code execution. This allowed the attacker to run arbitrary system commands and obtain sensitive information.
- Triaged in 3 months
- Fixed in 7 months
- Disclosed after 8 months
** crayons **
Description
The bFilename parameter in the scenario index.php/ccm/system/dialogs/block/design/submit is vulnerable to remote code execution via path traversal vulnerability. Authenticated attacker with rights to edit web application pages can upload malicious PNG file containing PHP code using any attachment upload functions (for example in comment section of the blog) and then use its relative path in bFilename parameter while editing layout design. The file, supplied in vulnerable parameter will be included in PHP, leading to injected malicious code to run.
Testing setup :
Concrete5 CMS version: 8.5.4 PHP Version: 7.2.24
Steps to reproduce
- Login to your Concrete5 account with rights to edit pages
- Upload using any attachment upload function png file, containing php code at its end. You can use file
png-transparent.pngfrom the attachments . It is empty PNG file with the following payload at its end:
<?php system("uname -a");?>
You can get file path for example by viewing uploaded file properties:

- Navigate to page edit constructor
- Select any element (for example Sidebar) and click "Add Layout" -> "Add Layout"
- Click on newly added block and select "Edit layout Design" -> Save
- Get the request from step 5 from any web proxy (for example Burp Suite) and resend it modifying
bFilenamewith the system relative path to the uploaded file, for example:
bFilename=../../../../application/files/9316/1312/5391/png-transparent.png
- Reload the page, your are editing, and see the payload fired

Credits
This bug was found as a part of Solar Security CMS Reseach, with https://hackerone.com/d0bby, https://hackerone.com/wezery0, https://hackerone.com/silvereniqma in collaboration. Can you, please, add them to this report?
Impact
Authenticated attacker with page editing rights can run arbitrary system commands and obtain sensitive information
Attachments
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application fails to sanitise the bFilename parameter, allowing directory traversal and inclusion of arbitrary local files in PHP.
Impact
An authenticated attacker with page editing rights could run arbitrary system commands and obtain sensitive information.
What the attacker needed
Authenticated account with page editing rights; Ability to upload attachments
How it was found
- Log in to Concrete5 with an account that has rights to edit pages.
- Upload a PNG file that contains PHP code at its end using any attachment upload function.
- Obtain the relative path of the uploaded file, for example by viewing its properties.
- Navigate to the page edit constructor and add a layout to any element.
- Edit the layout design and save, then capture the request with a web proxy.
- Modify the bFilename parameter to the relative path of the uploaded file and resend the request.
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 report has not been written yet. The Original tab links to the source.
The application lets users with editing rights upload files, such as images. It also has a feature that includes a file based on a user-supplied name, but it does not properly check the path. By uploading a file that contains code and then pointing the application to that file using a path that goes up and down directories, the attacker can make the server run their code.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.