Lucene search

K
wpvulndbRohan PageyWPVDB-ID:19138092-50D3-4D63-97C5-AA8E1CE39456
HistoryJul 26, 2022 - 12:00 a.m.

WPGraphQL WooCommerce <= 0.11.0 - Unauthenticated Coupon Codes Disclosure

2022-07-2600:00:00
Rohan Pagey
wpscan.com
17

The plugin does not prevent unauthenticated attackers from enumerating a shop’s coupon codes and values via GraphQL.

PoC

The vulnerability exists due to the plugin only preventing users from leaking coupons using the β€œcoupons” aggregate field, and not the regular β€œcoupon” field. Given a valid coupon id, any unauthenticated user can make this GraphQL call and get the coupon code associated with it. Please note that the coupon ids are in the format - base64(shop_coupon:x), where x is just a 2-3 digit integer and hence easy to enumerate. query{ coupon(id:β€œc2hvcF9jb3Vwb246MTk=”){ amount code } } Final URL should look like this: http://vulnerable-site.tld/graphql?query=query{coupon(id:β€œc2hvcF9jb3Vwb246MTIz”){amount code}}

CPENameOperatorVersion
wp-graphql-woocommerceeq*
Related for WPVDB-ID:19138092-50D3-4D63-97C5-AA8E1CE39456