Filepicker API key without domain restriction can be abused. Can be used by anyone on any website.
A third-party file upload API key used by Statuspage was exposed in client-side requests and lacked domain restrictions. An attacker could use the key on any website to upload files, consuming the paid service's quota and potentially causing financial charges.
- Accepted in 7 days
- Fixed in 2 months
- Disclosed after 3.1 years
Summary by Statuspage
Security misconfiguration of filepicker API key vulnerability in Statuspage
Summary by cybxis
Exposed and unsecured Filepicker API key can be used on any website.
Report details
-
Submitted
11 Jun 2020 05:00:21 UTC
-
Target Location
manage.statuspage.io -
Target category
Web App
-
VRT
Sensitive Data Exposure > Critically Sensitive Data > Private API Keys
-
Priority
P4
-
Bug URL
https://manage.statuspage.io/pages/frww6l2dpfc2/quick-setup/customize -
Description
On https://manage.statuspage.io/ whenever a user uploads a brand logo it used the 3rd party platform upload filepicker.io and you will get the request provided below on "Trace dump / HTTP request" section. It is URL encoded but if you decode it you will get the apikey value "AH8YrLApsTCitKuh29LiNz". I am pretty sure that the subscription of this apikey is not FREE for there is an s3/cloudfront integration and this kind of commercial does not fit a FREE plan for there is only 100 upload monthly limits, REFERENCE: https://www.filestack.com/pricing/
Base on this question on Stackoverflow there is no issue for an exposed filepicker API key because user's can whitelist domains that is only authorized for the key usage. However this is not present on the manage.statuspage.io website.
Proof of concept
I created a jsfiddle with filestack platform and provided your API key. Here is the link https://jsfiddle.net/x76jvo3y/ as you can see there is your key provided. Now try to upload a file from any source such as from local machine, web search or from link. Response:
Means the upload went through without any restriction. This proves that the key has no restriction and can be used on any website such as jsfiddle. Here is an example of domain restricted key. This is mine: https://jsfiddle.net/x76jvo3y/1/
Steps to reproduce
- Register and login at https://manage.statuspage.io/
- Upload brand logo
- Intercept the request until you encounter the request given below
- Decode the URL encoding and you will get this API key: AH8YrLApsTCitKuh29LiNz
- Go to this JSfiddle Link: https://jsfiddle.net/gh/get/library/pure/filestack/filestack-js/tree/master/examples/picker
- Provide the key on the api_key slot and RUN, then upload.
Mitigation
To set a domain restriction on the key: https://dev.filestack.com/apps/AH8YrLApsTCitKuh29LiNz/whitelisted-domains/ this is exactly the key that you need to add a domain whitelisting with your key I've already provided. You can set wildcards or any styles. This is to prevent any unauthorized use of the key.
IMPACT
- Anyone can freely use the API key on any website.
- Since this is a paid service from filestack means every upload counts, if this is used on more unauthorized sites the the limit will be easier to be consumed.
- Can cause unauthorized usage and will lead to unwanted financial charges.
-
HTTP request
OPTIONS /api/upload/?_cachebust=1591849687&js_session=%7B%22apikey%22:%22AH8YrLApsTCitKuh29LiNz%22,%22mimetypes%22:%5B%22image%2Fpng%22,%22image%2Fjpeg%22,%22image%2Fjpeg%22,%22image%2Fsvg%2Bxml%22,%22image%2Fgif%22,%22image%2Fvnd.microsoft.icon%22%5D,%22persist%22:false,%22version%22:%22v2%22,%22storeLocation%22:null,%22storePath%22:null,%22storeContainer%22:null,%22storeAccess%22:%22private%22,%22storeRegion%22:null,%22extensions%22:%5B%22.png%22,%22.jpg%22,%22.jpeg%22,%22.svg%22,%22.gif%22,%22.ico%22%5D,%22external%22:true%7D HTTP/1.1 Host: www.filepicker.io Connection: close Accept: */* Access-Control-Request-Method: POST Access-Control-Request-Headers: access-control-allow-headers,access-control-allow-origin,x-requested-with Origin: https://dialog.filepicker.io Sec-Fetch-Mode: cors Sec-Fetch-Site: same-site Sec-Fetch-Dest: empty Referer: https://dialog.filepicker.io/dialog/open/?key=AH8YrLApsTCitKuh29LiNz&id=1591849467479&referrer=manage.statuspage.io&iframe=true&version=v2&s=1,3,5,4,7&container=modal&language=en_us&plugin=js_lib&ext=.png,.jpg,.jpeg,.svg,.gif,.ico&co=crop User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.9
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 filepicker API key was not configured with a domain whitelist, allowing it to be used from any origin.
Impact
Anyone could use the API key on any website, consuming the paid upload quota and potentially causing unwanted financial charges.
What the attacker needed
A free account on manage.statuspage.io; ability to intercept HTTP requests
The fix
The API key should be restricted to the authorised domain(s) via the filepicker dashboard.
How it was found
- Register and log in to manage.statuspage.io.
- Upload a brand logo.
- Intercept the request to find the API key.
- Decode the URL encoding to obtain the key.
- Use the key on a third-party site to upload a file.
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.
When a website lets you upload a picture, it often uses another company's service to store the file. That service gives the website a special key, like a password, to prove the uploads are allowed. If that key is not locked to the website's own domain, anyone who finds it can use it from their own site, which can cost the website owner money.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.