Skip to content
Access control Disclosed report Intermediate

Outsider can affect Upvote Percentage of private subreddit post by calling /api/vote API

An attacker without access to a private subreddit could call the vote API with a post's identifier to change its upvote percentage, even though the vote count itself remained unchanged. The attacker needed to know the post identifier to perform the attack.

trieulieuf9 Follow

Originally disclosed on HackerOne

  • Triaged in 6 days
  • Fixed in 42 days
  • Paid in 6 days
  • Disclosed after 3 months

Summary:

Attacker that does not have access to a private subreddit, can still affect Upvote Percentage of any posts in this private subreddit. He does that by calling /api/vote API and passing post id directly.

What is Upvote Percentage?: F1407175

Impact:

  • Attacker can affect Upvote Percentage of private subreddit posts, although he does not have access to this private subreddit posts.
  • Only Upvote Percentage is changed, vote number is not affected.
  • Limitation: Attacker needs to know post id in private subreddit to start the attack.

Steps To Reproduce:

  1. Victim prepare a private subreddit and create a post in it [1]
  2. Attacker intercepts a legitimate /api/vote request in Burp and send to Repeater
  3. In Repeater, request body, change param id value to Victim's post id (assume that attacker has a way to get post id) F1407184
  4. Change param dir value to -1 and send request. Upvote Percentage decreases from 100% => 99%
  5. Then change param dir value to 1 and send request. Upvote Percentage decreases from 99% => 67%

[1]: If you just created a new post, please wait for half a day, until vote number is visible F1407178. It is fine to start the exploit right away, but the result does not update correctly until vote number is visible.

Impact

  • Attacker can affect Upvote Percentage of private subreddit posts, although he does not have access to this private subreddit posts.
  • Only Upvote Percentage is changed, vote number is not affected.
  • Limitation: Attacker needs to know post id in private subreddit to start the attack.

Attachments

upvote_percentage.png
upvote_percentage.png From the original on HackerOne
new_post.png
new_post.png
post_id.png
post_id.png

The original report as published on HackerOne, by trieulieuf9. 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 vote endpoint did not check whether the caller had permission to vote on posts in a private subreddit, only whether the post identifier was valid.

Impact

An attacker could alter the upvote percentage of posts in a private subreddit without being a member, but only if they knew the post identifier, and the vote count itself was not changed.

What the attacker needed

Knowledge of the private post's identifier

How it was found

  1. Victim creates a private subreddit and a post in it.
  2. Attacker captures a legitimate vote request and opens it in a repeater tool.
  3. Attacker replaces the post identifier with the victim's post identifier.
  4. Attacker sets the vote direction to downvote and sends the request, lowering the percentage.
  5. Attacker sets the vote direction to upvote and sends the request, lowering the percentage further.

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.

A private subreddit is a community that only approved members can see. The report shows that someone outside the community could still send a vote request to the site's voting system using a post's hidden identifier, and this changed the displayed percentage of upvotes. The actual number of votes did not change, but the percentage shown to members was altered.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by trieulieuf9

View all

3 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.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.