Delete Credit Cards from any Twitter Account in ads.twitter.com [New Vulnerability]
The Dismiss action for a failed credit card in Twitter's ads payment methods page accepted a credit card identifier without checking that it belonged to the requesting account. An attacker could guess the short numeric identifier and delete another advertiser's stored card, potentially disrupting their campaigns.
- Triaged in 4 hours
- Fixed in 3 days
- Paid in 5 days
- Disclosed after 23 days
i've found a new critical logical vulnerability that allow deleteing credit card of any twitter account in ads.twitter.com , the vulnerability affects the Dismiss functionality of credit cards in payments methods section
the vulnerability is similair to the one i've reported earlier [h1 report #27205] but this time the impact is higher as it only requires the credit card id without a need of the user account id.
the credit card id is only 6 numbers such as "220152" which can be easily guessed / brute-forced by an attacker and also an evil attacker could lanuch a massive attack to delete all credit cards from all twitter accounts and halt their own campaigns
Below is the technical details of the vulnerability:
##Affected Domain:
##Affected Page:
https://ads.twitter.com/accounts/18ce53wqoxd/payment_methods/handle_failed/220152
##Request Type: POST
##Affected POST Parameters: id
##Affected GET parameters: https://ads.twitter.com/accounts/18ce53wqoxd/payment_methods/handle_failed/220152 220152 at the URL
#Steps to reproduce the vulnerability:
-
Login to ads.twitter.com with your account
-
create a new campaign and add a payment method with credit card but the credit card should not be valid
-
wait for the pending status to finish [in my case it took with me around 48 hours ]
-
open the payments methods page to list your credit cards at
https://ads.twitter.com/accounts/[account id]/payment_methods -
you will find your credit card failed to get approved as on the screenshot: http://oi59.tinypic.com/292marr.jpg
-
press on Dismiss button and intercept the http request
###you will find the request as the following :
POST /accounts/18ce53wqoxd/payment_methods/handle_failed/220152 HTTP/1.1 Host: ads.twitter.com Connection: keep-alive Content-Length: 108 Cache-Control: max-age=0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 Origin: https://ads.twitter.com User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36 Content-Type: application/x-www-form-urlencoded Referer: https://ads.twitter.com/accounts/18ce53wqoxd/payment_methods Accept-Encoding: gzip,deflate Accept-Language: en-US,en;q=0.8 Cookie: [Your Cookies Here] utf8=%E2%9C%93&authenticity_token=Lb6HONDceN5mGvAEUvCQNakJUspD60Odumz%2FtrVdQfE%3D&id=219642&dismiss=Dismiss
send the request to repeater to use it later
-
repeat again the steps from 1 -> 3 but from a different twitter account and a different browser , also you can use this time a valid credit card .
-
open the payments methods page to list your credit cards at https://ads.twitter.com/accounts/[account id]/payment_methods then inspect the radio button of your credit card and copy the id value which will be 6 numbers.
-
now all you have to do is to repeat the request saved in burp suite and change the id value of credit card in POST and URL with the other twitter user account, then reply the request you will find that the credit card have been removed from that twitter account directly without user interaction .
kindly check and review the vulnerability Thanks
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 dismiss endpoint authorised the request only by the supplied card identifier and did not verify that the card belonged to the authenticated account.
Impact
An attacker could delete credit cards from other advertisers' accounts, which the reporter says could halt their campaigns; the text does not state whether any defence limited it.
What the attacker needed
An ads account; a card in failed state; knowledge of a card identifier
How it was found
- Log in to the ads site and create a campaign with an invalid card as payment method.
- Wait for the card's pending review to finish.
- Open the payment methods page and find the failed card.
- Press Dismiss and intercept the resulting request.
- Repeat the setup on a second account and copy that card's identifier from the page.
- Replay the saved request with the other account's card identifier in the body and URL.
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 you dismiss a failed card on the ads site, the request carries a short number that identifies the card. The server acted on that number without confirming the card was yours. Because the number is only six digits, someone could try many values and remove other people's payment methods.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.