Skip to content
Account takeover Write-up Intermediate

HacktoberFest2k21 vulnerability: How users metadata can be changed via Auth JWT tokens leaking from waybackurls

Authentication JWTs for the Hacktoberfest site were exposed in archived Wayback Machine URLs, and the JWT payload contained the user ID. An attacker could reuse a leaked token to change another user's metadata.

Anurag__Verma Follow

Published on medium.com

Here is my 6th writeup I will explain how I was able to change user metadata via auth JWTtokens leakings from the waybackurls logs and video POC available at last of writeup.

Anurag__Verma, on medium.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 authentication tokens were placed in URLs that got archived publicly, and the tokens themselves carried the user ID needed to target an account.

Impact

An attacker could change another user's metadata if a valid leaked token was found, though the report does not show how long tokens stayed valid or whether other actions were possible.

What the attacker needed

A free Hacktoberfest account; a leaked JWT found in Wayback archives

How it was found

  1. Link an account to GitLab or GitHub on the Hacktoberfest site.
  2. Capture the profile request in Burp Suite and note the JWT in the Authorization header.
  3. Analyse the JWT to see the user ID in its payload.
  4. Run waybackurls against the site to find archived URLs containing JWTs.
  5. Extract a user ID from a leaked JWT and send a request with that token and user ID.
  6. Observe a 200 OK response and the victim's metadata being changed.

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.

A JWT is a signed token a website gives you after login to prove who you are. Here, old copies of these tokens were saved in a public web archive, and each token also contained the user's ID. Anyone who found a token could use it to act as that user and change their profile information.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by Anurag__Verma

View all

9 more disclosed reports, best first.

More from DigitalOcean

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.