Skip to content
CSRF Write-up Beginner

TopCoder.com Vulnerabilities – A tail of site-wide bugs leads to accounts compromise & payments hijacking

TopCoder's sensitive forms for adding a secondary email and editing payment preferences lacked anti-CSRF tokens. An attacker could trick a logged-in user into submitting these forms, leading to account takeover or payment redirection.

Mohamed A. Baset Follow

Published on seekurity.com

Hi Folks, TopCode.com is a website where the most skilled top coders around the world are solving challenges, Competing and writing codes to achieve a specific tasks. Top high profile companies like (Facebook, Google, Twitter, etc..) are getting help from such websites in their recruitment process!

Mohamed A. Baset, on seekurity.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the application did not include or validate anti-CSRF tokens on sensitive form submissions.

Impact

An attacker could take over user accounts or redirect payments to their own PayPal account; the report notes the issues have been fixed with site-wide anti-CSRF tokens.

What the attacker needed

Victim is logged in; victim visits attacker page or clicks link

The fix

The issues were fixed by adding site-wide anti-CSRF tokens to protect sensitive form submissions.

How it was found

  1. Create a malicious HTML page with a form that posts to the TopCoder endpoint for adding a secondary email.
  2. Set the form fields to include the attacker's email address.
  3. Trick a logged-in TopCoder user into visiting the page and submitting the form.
  4. Use the added secondary email to initiate a password reset and take over the account.
  5. Alternatively, create a form that posts to the payment preferences endpoint with the attacker's PayPal address and desired accrual amount.
  6. Trick a logged-in user into submitting that form to redirect future payments.

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 write-up has not been written yet. The Original tab links to the source.

CSRF (Cross-Site Request Forgery) is when a malicious website makes a logged-in user's browser send a request to another site without the user knowing. Here, the forms that change email or payment settings had no secret token to prove the request came from the real site, so an attacker could forge them.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by Mohamed A. Baset

View all

20 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.