# Stored XSS in Question edit for product name (bypass #1416672)

Stored XSS in Judge.me Questions admin edit view via HTML-encoded product name that decodes to an img onerror payload after product deletion.

- Payout: $500
- Severity: medium
- Program: Judge.me
- Found by: errorinhuman
- Disclosed: 2022-03-31
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1428207
- Library page: https://bugbountylibrary.com/r/h1%3A1428207
- Tags: area:web domain:web impact:ato impact:integrity kind:bounty platform:hackerone sev:medium tech:php technique:incomplete-fix technique:second-order vuln:xss

**Target:** Judge.me Product Reviews/Questions admin edit page (Shopify app)
**Root cause:** Product name is stored HTML-entity-encoded and later rendered into the admin question edit view without proper output encoding, so entities decode into live HTML/JS.
**Steps:**
1. Create Shopify product with name `&#34;&#62;&#60;&#34;&#62;&#60;img src=x onerror=prompt(document.domain)&#62; img src=x onerror=prompt(document.domain)&#62;`
2. Post a question on that product from the storefront
3. Delete the product so its status becomes out-of-store in the question record
4. Open Shopify admin > Judge.me Product Reviews > Questions and edit the question; payload fires
**How found:** Prior report #1416672 was a similar stored XSS; researcher tested whether HTML-entity-encoded product names would decode and execute in the question edit view after the product was removed.
**Exploitation:** Attacker plants a crafted product name, gets a question associated, then the merchant/admin editing the question in Judge.me admin triggers the stored payload, enabling session theft.
**Insight:** When a fix blocks raw HTML in product names, try HTML-entity-encoded payloads and orphaned/deleted-product states where the sanitized value is re-rendered in admin views.

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

**Product name XSS payload with encoded img onerror**

```
create product with name `&#34;&#62;&#60;&#34;&#62;&#60;img src=x onerror=prompt(document.domain)&#62; img src=x onerror=prompt(document.domain)&#62;`
```

**Question submission with same XSS payload**

```
write question to our product with name `&#34;&#62;&#60;&#34;&#62;&#60;img src=x onerror=prompt(document.domain)&#62; img src=x onerror=prompt(document.domain)&#62;`
```

