Access MoPub Reports Data even after Company removed you from their MoPub Account.
A removed user could keep downloading a company's MoPub report data through the Reporting API because the API key was not reset when their account access was revoked. The attacker could read current and future reports as long as they had saved the API key and report IDs beforehand.
- Triaged in 6 days
- Fixed in 5 months
- Paid in 7 days
- Disclosed after 14 months
##Description + Attacking approach
API Workflow :
-
The MoPub Reporting API supports two separate CSV outputs where publishers can retrieve inventory or campaign performance data.
-
Publishers can retrieve daily reports via making a GET request using the request parameters.
-
This URL will return a 302 redirect response. The link to download the report will be returned in the response location header.
How you grab Report data even after company removed you
-
If Publisher/Company invite you for their MoPub Account with any permissions & Roles. ("administrators or Members" - it doesn't matter, which permission company gives you while invitation)
-
After accept the invitation you have access to make all changes to the company account.
Attacking approach start from here
- In order to retrieve data, the API must first be enabled for company account.
- So, you can Enable data access through API (just click on checkbox in the Reports page of the MoPub UI.)
or it might be already enabled by publisher.
- Note down the "Reporting API access details". [i.e. API key, Inventory report ID, Campaign report ID]
- Also Note the Report ID of each MoPub Report present inside the Company Account.
!!!
- Now, the publisher/company doesn't want you with their MoPub account and they removed you from their Manage User settings.
- But they forgot to Reset API key.
- Now, you don't have any access of company account.
NOTE! You have the "Reporting API access details (which you noted)".
Access the Reporting API :
- GET request using the request parameters.
[report_key=[individual_report_id ; inventory_report_id ; campaign_report_id] api_key=[API_KEY] date=Date of the report. Format YYYY-MM-DD] https://app.mopub.com/reports/custom/api/download_report?report_key=[REP_KEY]&api_key=[API_KEY]&date=[YYYY-MM-DD]
- Sample Request:
██████████
##Remediation :
- API key must be auto-reset after the user removed from company.
- (for 2nd condition in impact) Once the Data access is disabled, user should not be able to access reports data via API.
.
Thank you : )
Impact
- Attacker(removed user) able to access Organization Current as well as in Future created MoPub reports in 2 conditions :
- If API key is not reset and "data access through API" checkbox is enabled
- If API key is not reset and "data access through API" checkbox is disabled.
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 API key was not invalidated when the user was removed from the company account, so the key kept working independently of account membership.
Impact
A removed user could still read the organisation's current and future reports, even when the data access checkbox was disabled, as long as the API key was not reset.
What the attacker needed
Invitation to the company account; any role accepted; API access enabled or enableable; saved API key and report IDs
The fix
The API key should be reset automatically when a user is removed, and disabling data access should stop API report retrieval.
How it was found
- Get invited to the company's MoPub account with any role and accept.
- Enable data access through the API in the Reports page, or use it if already enabled.
- Note the API key and the inventory, campaign and individual report IDs.
- Get removed from the company's Manage User settings.
- Send a GET request to the report download endpoint with the saved key and report ID.
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 company removes someone from its account, it expects that person to lose access to everything. Here the reporting API used a separate key that stayed valid after removal, so the person could still fetch reports with the key they had saved earlier. This is a case of access not being fully revoked.
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.