CSRF in twitterflightschool.com ( CAN POST ON TIMELINE WITHOUT USER PERMISSION)
The site's state-changing API endpoints accepted requests without any anti-CSRF token, so a page on another origin could make a logged-in user's browser post to the user's Twitter timeline or change their account settings. The reporter claims any user could be made to perform these actions without their permission.
Originally disclosed on HackerOne
- Fixed in 20 months
- Disclosed after 21 months
Hi,
- Go to twitterflightschool.com and start intercepting every request .
- No csrf tokens are present in the requests
- Even in account settings there are no csrf tokens
Attacker could post on twitter timeline of user (https://twitterflightschool.com/module/twitter-for-executives/chapter/final) Tcp dump:
POST /api/twitter/upload HTTP/1.1
Host: twitterflightschool.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://twitterflightschool.com/module/twitter-for-executives/chapter/final
Content-Length: 328
Cookie: _ga=████; connect.sid=████████; _gat=1
Connection: keep-alive
updatedAt=2016-01-29T19%3A43%3A41.223Z&createdAt=2016-01-29T19%3A43%3A41.223Z&url=%2Fassets%2Fgifs%2Fl.gif&_id=56abc0ed22d87b9d6a64a4c2&body=%5Bobject%20Object%5D&__v=0&text=This%20bird%E2%80%99s%20gotta%20fly!%20%23TwitterFlightSchool%20completed.%20Learn%20about%20Twitter%20ads%20at%3A%20https%3A%2F%2Ftwitterflightschool.com
Every user on twitterflightschool can be subjected to csrf token. Tcp dump while account settings:
POST /api/users/me HTTP/1.1
Host: twitterflightschool.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://twitterflightschool.com/register
Content-Length: 244
Cookie: _ga=█████████; _gat=1; connect.sid=████
Connection: keep-alive
country=IN&email=███████%40gmail.com&firstname=prashanth&lastname=varma&language=en-US&twitterId=1192789765&username=prashanth_scss&verificationUrl=https%3A%2F%2Ftwitterflightschool.com%2Fverify%2F&companyType=other&othercompany=lol
Tcp dump while enrolling :
POST /api/users/track/{COURSE_ID}/enroll HTTP/1.1
Host: twitterflightschool.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://twitterflightschool.com/track-selection
Content-Length: 20
Cookie: _ga=█████; _gat=1; connect.sid=██████
Connection: keep-alive
twitterId=1192789765
Regards prashanth
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 server authenticated state-changing requests using only the session cookie and never checked a per-request anti-CSRF token or origin.
Impact
An attacker could cause a logged-in victim to post content to their Twitter timeline or alter their account settings, though the report does not demonstrate a working cross-site exploit page.
What the attacker needed
Victim logged in to the site; victim visits attacker page
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 are logged in to a site, your browser automatically sends your session cookie with every request to that site. If the site does not also require a secret value that only its own pages know, another website can quietly make your browser send a request that changes your account. This is called cross-site request forgery, or CSRF.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.