# Bypass a fix for report #708013

Storefront API customerAccessTokenCreate rate limit bypassed by appending whitespace to email, enabling unlimited password brute force against customer accounts.

- Payout: $3,500
- Severity: medium
- Program: Shopify
- Found by: scaramouche31
- Disclosed: 2021-12-07
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1363672
- Library page: https://bugbountylibrary.com/r/h1%3A1363672
- Tags: area:web domain:api impact:ato kind:bounty platform:hackerone sev:medium tech:graphql technique:incomplete-fix technique:unicode-normalization vuln:auth-bypass vuln:business-logic

**Target:** Shopify Storefront GraphQL API customerAccessTokenCreate mutation
**Root cause:** Login attempt throttling keyed on the raw email string, so a trailing whitespace produces a distinct throttle key while the backend still resolves the same account for authentication.
**Steps:**
1. Obtain a Storefront API access token (e.g. from Buy Button App).
2. POST to `/api/2020-07/graphql` with `X-Shopify-Storefront-Access-Token` header and mutation `customerAccessTokenCreate(input:{email,password})`.
3. Repeat until response returns `Login attempt limit exceeded`.
4. Append a whitespace to the email value and resend; limit no longer triggers.
5. Confirm the whitespace email still authenticates and returns a valid `customerAccessToken`.
**How found:** Followed up on prior report #708013's fix and hypothesized the throttle key normalization was incomplete; tested appending whitespace to the email to see if it created a new throttle bucket while remaining a valid login.
**Exploitation:** Attacker repeatedly calls customerAccessTokenCreate with the victim email, cycling whitespace variants (or other empty/control characters) to evade the per-email throttle, brute-forcing the password until a token is returned, then uses the token to access the customer account.
**Insight:** When a rate limit is keyed on a user-supplied identifier, test whether the auth backend normalizes that identifier differently than the throttle layer (trailing whitespace, unicode, null bytes) so one account maps to many throttle keys.

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

**GraphQL login mutation with trailing-space email bypass**

```
{"query":"mutation { customerAccessTokenCreate(input: {email: \"███\", password: \"████████\" }) { customerAccessToken { accessToken } } }"}
```

