Skip to content
Access control Disclosed report Intermediate

Apps can access 'channels' beta api

An undocumented API endpoint allowed apps to access sales channel management without the required extra permission. An attacker could add, remove, and modify sales channels using an app token.

rms Follow

Originally disclosed on HackerOne

Bounty$500 View original
  • Triaged in 2 days
  • Fixed in 5 days
  • Paid in 11 days
  • Disclosed after 11 days

Summary by the program

This issue allowed some apps to access the beta api at /admin/channels. This api should only have been accessible to apps with an extra permission granted by our engineering team.

Summary by the researcher

Using an undocumented api endpoint, an app could add, remove and modify sales channels.

The report

Hello,

As documented here, an app can access to the following scopes : https://docs.shopify.com/api/authentication/oauth#scopes. But an app can request/get access to a lots more scopes, and some of those scope shouldn't be accessible.

PoC

https://victim.myshopify.com/admin/oauth/authorize?client_id=fc49e813f5aad9c8d8f65117031a9684&scope=read_apps,write_apps,write_content,read_content,write_customers,read_customers,read_disputes,write_fulfillments,read_fulfillments,write_gift_cards,read_gift_cards,write_orders,read_orders,read_products,write_products,read_script_tags,write_script_tags,write_scripts,read_scripts,read_shipping,write_shipping,write_social_network_accounts,read_social_network_accounts,read_themes,write_themes,read_channels,write_channels&redirect_uri=http://while42.myshopify.com/&state=123&shop=while42

Then request the access_token, and use it to access to any of those scopes.

Attachments

Capture_d__cran_2015-11-07___20.30.18.png
Capture_d__cran_2015-11-07___20.30.18.png From the original on HackerOne

The original report as published on HackerOne, by rms. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the OAuth scope validation did not restrict the undocumented 'channels' scopes to apps with the extra engineering-granted permission.

Impact

An app could add, remove and modify sales channels without the required extra permission.

What the attacker needed

A Shopify app; victim installs or authorises the app

How it was found

  1. Send a victim to the OAuth authorize URL with the extra channels scopes included.
  2. Exchange the returned code for an access token.
  3. Use the token to call the undocumented /admin/channels API and modify sales channels.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Apps on Shopify ask for permissions (scopes) when a user installs them. Some permissions are meant to be restricted to trusted apps only. Here, an app could request a hidden permission and then use it to change sales channels, which are ways of grouping products for different markets or platforms.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by rms

View all

4 more disclosed reports, best first.

More from Shopify

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.