Skip to content
IDOR Write-up Beginner

Restaurant Guru IDOR vulnerabilities

The comment endpoints on Restaurant Guru lacked authorization checks, so an attacker could overwrite, delete, or bind images to any comment by supplying its identifier. They could also change the star rating of any comment.

medium.com

Published on medium.com

Restaurant Guru allows anyone to write a comment on the page of their favorite restaurant, either if the user is logged in or not, so thats what I did, I hooked up burp suite and wrote a comment.

nekka, 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

The server trusted the comment identifier supplied by the client and did not verify that the requesting user owned that comment.

What the attacker needed

No account required for some actions; knowledge of target comment id; victim has a comment on the site

How it was found

  1. Post a comment and observe the /ajax/comment_add request with a cid field set to 0.
  2. Edit the comment and note that the same endpoint uses cid to identify the comment.
  3. Scrape another user's comment id from the page and set cid to that value in a request to /ajax/comment_add.
  4. Observe that the other user's comment content is replaced.
  5. Post a comment from a second account, scrape its id, and send a request to /ajax/comment_delete with that id.
  6. Observe that the other account's comment is deleted.

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.

When you post a comment on a website, the site should check that you are the person who wrote it before letting you change or delete it. Here it did not check, so anyone who knew the number of someone else's comment could edit or remove it.

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.

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.