~/deadhead.blog web · api · mobile · bug bounty
All posts

Winning the argument on a duplicate

Convinced triage to upgrade an Open Redirect to DOM XSS one minute before they closed it. Payout: EUR 0.

Process · 4 min read

A private program for a global luxury retail brand. An international e-commerce platform with localized storefronts across thirty countries.

I found an unauthenticated DOM-based sink, chained it through the brand's own passwordless login emails, argued the triage team into upgrading the finding from an Open Redirect to DOM XSS, and had the ticket retitled to CWE-79.

One minute later, they closed it as a duplicate.

The technical work was sound. The escalation persuaded them completely. And the bounty was €0, because I broke my own reconnaissance gate to hunt on a saturated surface.

The sink#

On the storefront's SPA, /{locale}/alternative-login handled fallback magic-link authentication.

In the minified route chunk served to every visitor:

alternativeLogin() {
    try {
        this.trackAlternativeLoginSuccess(),
        this.redirectUrl
            ? window.location.assign(this.redirectUrl)
            : window.location.assign(this.overviewUrl)
    } catch(e) {
        return this.trackAlternativeLoginFailure(),
               this.$pageErrorHandler(new f(e, this.getTargetUrl()))
    }
}

Where this.redirectUrl came from:

redirectUrl() {
    return this.isVerifiedContext
        ? this.response?.redirect_url
        : (this._.provides[e] || this.$route).query['redirect-url']
}

If the user lands from a verified authentication callback, the destination comes from the API response. Otherwise, it pulls redirect-url straight off the query string with no origin check and no scheme check.

Feed it an https:// destination:

https://shop.example.com/en-us/alternative-login?redirect-url=https://attacker.example/

The browser hits the page, hydrates, and immediately navigates away. An open redirect that needs no session, no token, and no valid credentials.

Escalating to script execution#

An open redirect alone is usually a low-severity finding that programs triage reluctantly. But window.location.assign() is an execution sink:

https://shop.example.com/en-us/alternative-login?redirect-url=javascript:alert(document.domain)

No Content Security Policy (script-src) was configured on the route. The parameter passed straight into assign(), and the script executed in the origin of the e-commerce store.

To make the impact undeniable, I chained it to the passwordless login flow. The storefront's unauthenticated API exposed an endpoint:

POST /api/v1/login/send_magic_link HTTP/2
Host: api.example.com

{
  "username": "victim@example.com",
  "redirect_url": "https://shop.example.com/en-us/alternative-login?redirect-url=javascript:..."
}

The backend API validated that redirect_url belonged to the retailer's own domain. Because shop.example.com is legitimate, the API accepted it and dispatched a real login email from the retailer's mail server.

The lure was a genuine, cryptographic magic link with no visible external destination. When the victim clicked it, authenticated, and landed on the store, the unvalidated parameter triggered script execution in their authenticated session.

The triage escalation#

I filed the initial report as an Open Redirect (CWE-601, CVSS 6.1) while I verified the execution chain, then followed up with evidence for DOM XSS (CWE-79):

  1. Quote their shipped code. Instead of pasting generic scanner traces, I located the exact unminified expressions in their client bundle and walked triage through the control flow.
  2. Correct bad remediation advice early. In my first comment, I had suggested their API validation was weak. I spent a day running 72 normalisation test cases against the backend validator (IDNA mappings, authority terminators, JSON type confusion, duplicate keys) and proved the API parser was conformant. The bug was purely in the frontend chunk. I told them not to waste engineering hours patching the backend.
  3. Argue against your own proposal when the evidence demands it. I initially proposed CVSS 9.3. But when I audited what was actually reachable in localStorage, there were only analytics tokens and device IDs—no customer PII or session secrets. Edge filters blocked cross-origin reads. I explicitly withdrew the 9.3 rating and told triage the original 6.1 score was accurate, asking only for the vulnerability class to be updated to Cross-Site Scripting.

It worked. The security team accepted the analysis, retitled the ticket to "DOM XSS + Open Redirect", and updated the vulnerability classification to Cross-site Scripting (XSS) - DOM (CWE-79).

Sixty seconds later, an automated note closed the ticket:

Closed: Duplicate of #329.

Payout: €0. Points: 6.

The gate that called it#

The technical argument was right. The failure happened days before I typed the first payload.

When I set up the engagement, my own scope gate evaluated the storefront asset:

Row 1 (Storefront Country Locales): 342 prior reports. FAIL: Saturated. Do not hunt here.

I had a working rule: when an asset has several hundred resolved reports on a mature public program, commodity issues—especially unauthenticated query-string parameters on main navigation routes—are almost certainly already claimed.

I overruled the gate anyway with a piece of clever rationalisation:

"The target had an explicit scope carve-out for legacy .jsp endpoints. Everyone else must be avoiding the storefront, and our finding is on a modern Nuxt SPA route. The SPA is the uncrowded sibling."

That narrative was completely false.

The .jsp carve-out hadn't kept other hunters away from the SPA; at least one other researcher had found the exact same parameter on the exact same route weeks earlier.

A count of 342 prior reports isn't an indicator of difficulty. It is a direct probability that someone has already stood where you are standing.

What was actually learned#