Shopify · Report #104931
CSRF in Connecting Pinterest Account
Validstatus
2upvotes
2 Feb 2016disclosed
How it was found
Hi,
The connect to Pinterest function is vulnerable to CSRF. This allows an attacker to connect his/her pinterest account to the victim's shopify. Even if the victim has already connected a pinterest account, this will allow the attacker to replace the existing connected pinterest account with the attacker's own pinterest account.
#PoC Note: I have also attached screenshots showing each step
- Victim(mshop2-2) already has Pinterest account connected.
- Attacker(mshop3-2) doesn't have Pinterest account connected and attempts to connect a Pinterest account.
- Attacker authorize the shopify app to connect to his Pinterest account.
- Attacker intercepts the redirection back to
pinterest-commerce.shopifyapps.comand drop the request. Attacker also captures the URL, e.g.https://pinterest-commerce.shopifyapps.com/auth/pinterest/callback?code=d0c18854a3359866774d479614081453d235962f - Attacker induces Victim to load the above captured URL.
- Victim's connected Pinterest account has been replaced with the attacker's Pinterest account.
#Possible Fixes
- Make use of the state parameter in OAuth, which is used to prevent CSRF, when connecting to Pinterest.