Skip to content
IDOR Disclosed report Beginner

IDOR lets a malicious user reveal the unpinned achievement badges of any Reddit user

An IDOR vulnerability in Reddit's achievement badge preview endpoint allowed any user to check whether another user had a specific badge, even if that badge was unpinned and hidden from their public profile. By iterating over badge IDs, an attacker could enumerate all badges a user had earned, exposing information the user had chosen to hide.

saurabhb Follow

Originally disclosed on HackerOne

  • Triaged in 25 hours
  • Disclosed after 17 days

Summary:

Reddit launched a new feature in June 2024 changelog. It is about Achievement Badges being available in profile . As per its the access control a badge is supposed to be hidden to other users if the badge owner unpins it. However, this IDOR vulnerability lets a malicious user find all the hidden badges with the knowledge of username (which is public) and badge id (which is a simple 1-2 digit incremental number)

Impact:

Badges tell a lot about a Reddit user. That is the reason Reddit gave an option for user to hide them. This vulnerability is a threat to confidentiality of Reddit users. It can tell a malicious user about if the user joined more than a threshold number of communities, does this person have high (> 10%) upvote rating, does the person comment in same community in 20 days straight, does the person votes/post/comments in reddit for certain amount of days etc. Basically all the actions due to which an badge gets rewarded gets exposed.

Steps To Reproduce:

  1. Create a Reddit account.
  2. Go to any post of any user.
  3. Share it outside of Reddit by just creating a embedding of the post. Please use Share -> Embed feature.
2024-07-23_124553.png
2024-07-23_124553.png From the original on HackerOne
  1. Now go to your profile's achievement section and observe that the New Share badge gets unlocked.
  2. Click on that badge and unpin it. This makes it hidden from others.
2024-07-23_124904.png
2024-07-23_124904.png From the original on HackerOne
  1. Please read this support article which states that unpinning a badge will hide it from others.
2024-07-23_125018.png
2024-07-23_125018.png From the original on HackerOne
  1. Now create another account. Please try to create using mobile number due to some reasons.
  2. Login to the newly created account.
  3. Go to the first users achievement page. The way to do it is craft this URL and visit it in browser https://www.reddit.com/user/<the-username-here>/achievements/.
  4. Observe that the New Share badge is hidden.
2024-07-23_125412.png
2024-07-23_125412.png From the original on HackerOne
  1. Now request the following url in same browser https://share.redd.it/preview/user/<the-usename-here>/achievement/10?show-user-info=true and observe that you get a response with an image meaning that the provided username has New Share badge.
2024-07-23_125557.png
2024-07-23_125557.png From the original on HackerOne
  1. Now change the 10 in URL to 11 or 9 and observe that you get a Not found message.
2024-07-23_125723.png
2024-07-23_125723.png From the original on HackerOne
2024-07-23_125708.png
2024-07-23_125708.png
  1. Thus, a Not Found response means that that particular user does not have that badge and a Valid Image response means that that user has that particular badge.
  2. Using this technique we can enumerate the Achievement Badges of any arbitrary user of Reddit.

Additional Information:

  1. Confidentiality is set to HIGH because entire badge component and every badge is affected.
  2. Privileges required is set to NONE because anyone can register to Reddit as it is a public platform so it is equivalent to no authentication.

Impact

Badges tell a lot about a Reddit user. That is the reason Reddit gave an option for user to hide them. This vulnerability is a threat to confidentiality of Reddit users. It can tell a malicious user about if the user joined more than a threshold number of communities, does this person have high (> 10%) upvote rating, does the person comment in same community in 20 days straight, does the person votes/post/comments in reddit for certain amount of days etc. Basically all the actions due to which an badge gets rewarded gets exposed.

The original report as published on HackerOne, by saurabhb. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 badge preview endpoint did not enforce the same visibility rules as the profile page, allowing any user to query badge existence by username and badge ID.

Impact

A malicious user could determine which badges any Reddit user has earned, including badges the user had unpinned to hide, revealing information about their activity and community engagement.

What the attacker needed

A Reddit account; knowledge of the target username; badge IDs are simple incremental numbers

How it was found

  1. Create a Reddit account and share a post using the Embed feature to unlock the New Share badge.
  2. Unpin the New Share badge so it is hidden from others.
  3. Create a second account and log in.
  4. Visit the first user's achievements page and confirm the badge is hidden.
  5. Request the badge preview URL for the first user with badge ID 10 and observe a valid image response.
  6. Change the badge ID to 9 or 11 and observe a Not Found response, confirming enumeration is possible.

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 earn a badge on Reddit, you can unpin it so other people do not see it on your profile. However, a separate image preview link still revealed whether you had that badge, and anyone could try different badge numbers to discover all of them. This is called an IDOR because the system did not check that the person asking was allowed to see that hidden information.

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.

More by saurabhb

View all

10 more disclosed reports, best first.

More from Reddit

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

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.