Multiple Vulnerabilities in flatCore CMS

Title

Multiple Vulnerabilities

Product

flatCore CMS

Vulnerable Version

<=1.5.5

Fixed Version

1.5.7

CVE Number

CVE-2020-17451, CVE-2020-17452

Impact

high

Found

03.28.2020

By

Farhan Rahman, Azrul Ikhwan Zulkifli | SEC Consult Vulnerability Lab (Office Malaysia)

flatCore CMS suffers from multiple vulnerabilities including stored cross site scripting and arbitrary file upload. The edit content panel of flatCore allows authenticated users to inject malicious client side script which leads to stored cross site scripting. Additionally, arbitrary files such as web shells can be uploaded to the server due to the insufficient file upload validation which leads to a full system compromise.

Vendor Description

“flatCore is based on PHP and PDO/SQLite. The Core is as minimalistic as possible, but can be easily extended by the modular structure. If you are looking for a solution to edit your website live and with ease, flatCore may be your buddy.”

Source: https://flatcore.org/

Business Recommendation

Update to the latest version of flatCore CMS. An in-depth security analysis performed by security professionals is highly advised, as the software may be affected from further security issues.

Vulnerability Overview / Description

1. Stored Cross Site Scripting (Authenticated user) – CVE-2020-17451

This vulnerability allows an authenticated user (admin) to inject a malicious client side script which will be executed in the browser of a user if he visits the manipulated URL. In this case, the payload will be executed when the user visits any page that contains the injected malicious client side script.

2. Upload of arbitrary files (Authenticated user) – CVE-2020-17452

It was identified that an authenticated user (admin) has the possibility to upload malicious files without any restriction. In this specific case, arbitrary server side PHP code such as web shells can be uploaded. As a result the attacker can run arbitrary code on the server side with the privileges of the web server. This could lead to a full system compromise.

Proof Of Concept

1. Stored Cross Site Scripting (Authenticated user)

The following parameters have been found to be vulnerable to stored cross site scripting attacks.

a)

URL : $DOMAIN/acp/acp.php METHOD : POST PARAMETER : page_linkname, page_title, page_content, page_extracontent PAYLOAD : aaaa%3Cscript%3Ealert%28document.cookie%29%3C%2Fscript%3E

Go to 

$DOMAIN

 and the XSS will be executed.

b)

URL : $DOMAIN/acp/acp.php METHOD : POST PARAMETER : prefs_pagename, prefs_pagetitle, prefs_pagesubtitle PAYLOAD : aaaa%3Cscript%3Ealert%28document.cookie%29%3C%2Fscript%3E

Go to 

$DOMAIN

 and the XSS will be executed.

2. Upload of arbitrary files (Authenticated user)

Go to Upload Files > Choose destination > files. Upload a desired PHP web shell as the shell.php file. Once uploaded, to execute the webshell, go to 

$DOMAIN/content/files/shell.php

Vulnerable / Tested Versions

flatCore CMS version 1.5.5 has been tested, which was the latest version available at the time of the test. Previous versions may also be affected.

Vendor Contact Timeline

2020-04-02 Contacting vendor through support@flatcore.org.
2020-04-28 Vendor developer asked for details. Sending details.
2020-06-02 Follow-up with vendor; no response.
2020-06-08 Follow-up with vendor; no response.
2020-06-10 Vendor requested to give them some times to patch the vulnerabilities.
2020-07-10 Follow-up with vendor; no response.
2020-07-22 Vendor fixed the reported issues, and released the new version (1.5.7) on their website.
2020-08-07 Public release of security advisory.

Solution

The fixed version 1.5.7 is available at the vendor’s download section:
https://flatcore.org/downloads/

Workaround

None

Advisory URL

Vulnerability Lab

 

EOF F. Rahman, A. I. Zulkifli / @2020

 

Interested to work with the experts of SEC Consult? Send us your application
Want to improve your own cyber security with the experts of SEC Consult? 
Contact our local offices.